diff --git a/composer.json b/composer.json index 7ff8afcbaa2d74264defad4166570b4c45762c19..7211e1fc6b2149b6fe4833ff0992162bb7625482 100644 --- a/composer.json +++ b/composer.json @@ -149,7 +149,7 @@ "drupal/roleassign": "2.0.2", "drupal/scheduler": "2.0.4", "drupal/simple_gmap": "3.1.0", - "drupal/simple_sitemap": "4.1.9", + "drupal/simple_sitemap": "4.2.1", "drupal/smtp": "1.4", "drupal/social_media": "2.0.0", "drupal/social_media_links": "^2.8", diff --git a/composer.lock b/composer.lock index c797facfdaa03c64af03a8f5cf3e39a94a4afdd7..ebabc82c25c1de2464cd44187be31aa87adeec0b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0d4c6a3249b792d3cd08fdddd474ff5f", + "content-hash": "59c19fb4452bc31f9dcd56c6056a1929", "packages": [ { "name": "algolia/places", @@ -5904,27 +5904,27 @@ }, { "name": "drupal/simple_sitemap", - "version": "4.1.9", + "version": "4.2.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/simple_sitemap.git", - "reference": "4.1.9" + "reference": "4.2.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.1.9.zip", - "reference": "4.1.9", - "shasum": "d86d90408b334cd7470ea631e3be5acca2103377" + "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.2.1.zip", + "reference": "4.2.1", + "shasum": "d96b481571ca2fecdb305e87d2557f9338116864" }, "require": { - "drupal/core": "^9.3 || ^10", + "drupal/core": "^10.2 || ^11", "ext-xmlwriter": "*" }, "type": "drupal-module", "extra": { "drupal": { - "version": "4.1.9", - "datestamp": "1712441608", + "version": "4.2.1", + "datestamp": "1723802052", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -5948,7 +5948,7 @@ "role": "Maintainer" }, { - "name": "WalkingDexter", + "name": "walkingdexter", "homepage": "https://www.drupal.org/user/3251330" } ], diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bd1439c1021afd764a59b21c6161efb5e236d42f..0533e49459cb0f9a6995fc478d78a611b60faac4 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -6206,28 +6206,28 @@ }, { "name": "drupal/simple_sitemap", - "version": "4.1.9", - "version_normalized": "4.1.9.0", + "version": "4.2.1", + "version_normalized": "4.2.1.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/simple_sitemap.git", - "reference": "4.1.9" + "reference": "4.2.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.1.9.zip", - "reference": "4.1.9", - "shasum": "d86d90408b334cd7470ea631e3be5acca2103377" + "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.2.1.zip", + "reference": "4.2.1", + "shasum": "d96b481571ca2fecdb305e87d2557f9338116864" }, "require": { - "drupal/core": "^9.3 || ^10", + "drupal/core": "^10.2 || ^11", "ext-xmlwriter": "*" }, "type": "drupal-module", "extra": { "drupal": { - "version": "4.1.9", - "datestamp": "1712441608", + "version": "4.2.1", + "datestamp": "1723802052", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6252,7 +6252,7 @@ "role": "Maintainer" }, { - "name": "WalkingDexter", + "name": "walkingdexter", "homepage": "https://www.drupal.org/user/3251330" } ], diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 848d67372cf2efb6a3b6e4525aa729ae44cda9fb..2c9a2a3fc5569d5bfbeb8c17bdaed506084f1227 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'osu-asc-webservices/d8-upstream', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'f298cb58cc244630e9c56c682a0a3daffebd3fb8', + 'reference' => 'cbe507440a7230022e823506d1e7857b0dff3072', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -1052,9 +1052,9 @@ 'dev_requirement' => false, ), 'drupal/simple_sitemap' => array( - 'pretty_version' => '4.1.9', - 'version' => '4.1.9.0', - 'reference' => '4.1.9', + 'pretty_version' => '4.2.1', + 'version' => '4.2.1.0', + 'reference' => '4.2.1', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/simple_sitemap', 'aliases' => array(), @@ -1564,7 +1564,7 @@ 'osu-asc-webservices/d8-upstream' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'f298cb58cc244630e9c56c682a0a3daffebd3fb8', + 'reference' => 'cbe507440a7230022e823506d1e7857b0dff3072', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/web/modules/simple_sitemap/.gitlab-ci.yml b/web/modules/simple_sitemap/.gitlab-ci.yml index 99858a714a24e290ffce408f9677c2fb8b3ffb65..da8c676c060dd0f57978283e127276e500f4f8fd 100644 --- a/web/modules/simple_sitemap/.gitlab-ci.yml +++ b/web/modules/simple_sitemap/.gitlab-ci.yml @@ -8,7 +8,7 @@ include: variables: SKIP_CSPELL: 1 - OPT_IN_TEST_PREVIOUS_MAJOR: 1 OPT_IN_TEST_PREVIOUS_MINOR: 1 OPT_IN_TEST_NEXT_MINOR: 1 + OPT_IN_TEST_NEXT_MAJOR: 1 OPT_IN_TEST_MAX_PHP: 1 diff --git a/web/modules/simple_sitemap/js/simple_sitemap.sitemapEntities.js b/web/modules/simple_sitemap/js/simple_sitemap.sitemapEntities.js index f1e5fd026a8b78ea4e9661081c3239fd5d15b0e2..92489eda2d08d7eb31e1646492e404d574519b7a 100644 --- a/web/modules/simple_sitemap/js/simple_sitemap.sitemapEntities.js +++ b/web/modules/simple_sitemap/js/simple_sitemap.sitemapEntities.js @@ -1,45 +1,48 @@ /** * @file - * Attaches simple_sitemap behaviors to the sitemap entities form. + * Defines the behavior of the entity settings form. */ -(($, Drupal, once) => { - Drupal.behaviors.simpleSitemapEntities = { - attach() { - const $checkboxes = $( - once( - 'simple-sitemap-entities', - 'table tr input[type=checkbox][checked]', - ), - ); - if ($checkboxes.length) { - $checkboxes.on('change', function change() { - const $row = $(this).closest('tr'); - const $table = $row.closest('table'); +((Drupal, once) => { + /** + * The behavior of the entity settings form. + * + * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches the behavior to the form. + */ + Drupal.behaviors.simpleSitemapEntities = { + attach(context) { + once( + 'simple-sitemap-entities', + 'table tr input[type=checkbox][checked]', + context, + ).forEach((checkbox) => { + checkbox.addEventListener('change', (event) => { + const row = event.target.closest('tr'); + const table = event.target.closest('table'); - $row.toggleClass('color-success color-warning'); + row.classList.toggle('color-success'); + row.classList.toggle('color-warning'); - const showWarning = $table.find('tr.color-warning').length > 0; - const $warning = $('.simple-sitemap-entities-warning'); + const messages = new Drupal.Message(); + const id = 'simple-sitemap-entities-warning'; + const showMessage = table.querySelector('tr.color-warning') !== null; + const messageExists = messages.select(id) !== null; - if (showWarning && !$warning.length) { - $(Drupal.theme('simpleSitemapEntitiesWarning')).insertBefore( - $table, + if (showMessage && !messageExists) { + messages.add( + Drupal.t( + 'The sitemap settings and any per-entity overrides will be deleted for the unchecked entity types.', + ), + { id, type: 'warning' }, ); - } - if (!showWarning && $warning.length) { - $warning.remove(); + } else if (!showMessage && messageExists) { + messages.remove(id); } }); - } + }); }, }; - - $.extend(Drupal.theme, { - simpleSitemapEntitiesWarning() { - return `<div class="simple-sitemap-entities-warning messages messages--warning" role="alert">${Drupal.t( - 'The sitemap settings and any per-entity overrides will be deleted for the unchecked entity types.', - )}</div>`; - }, - }); -})(jQuery, Drupal, once); +})(Drupal, once); diff --git a/web/modules/simple_sitemap/logo.png b/web/modules/simple_sitemap/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..4a15f6a8abb51cc36b9bf813e9c3b8047add55f2 --- /dev/null +++ b/web/modules/simple_sitemap/logo.png @@ -0,0 +1,69 @@ +�PNG + +��� IHDR����������x�����IDATx��ϋ��u�w�AU�+� ��ZH Zl�4h6]�����M�骛�Zo��)�섴)iK�0�dQ��"-$�Eq�R���sKC@�g���{����0�~��|�#�{�������E����R�[� @���' �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e ��`>���g1V�������^�:9}�zп�ܾy+���aO�= ��0�|P{��'@����@��k��j���{(* ��� @����P{��'@����@��k��j�����[�������ъk/������W��6�� ����0��|qa���~��7�xY +��ڋ�_��,�fQ��=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@���=@�� + +���e �� @����Pp�Z&@������_����^����+��K?+.�}�, ��y:���_^{���J��.'�#�˹���t- �t=>�'@����.��. е�����,��\N@����� @�@�@��x p9 �rnk�����Z�;���x�|x~��zݸqcx��Nj��'�ur�Z��=����x������{���� @����>�n� @�;���Y0�. �L7� Н�����,��L��z�N@��ndL����� =��t' �t72&@����醞@������ @�����tCO @��� �ݍ̂ @��t`��' @������Ff� @`���0�� @�@w@w#�` 0]@��n� @�;���Y0�. �L7� Н�����,��L��z�N@��ndL����� =��t' �t72&@����醞@������ @�����tCO @��� l����[ug{o8>:�lՖK���i{������iq����6Z&@�����;+#@��k��F�� @`��|gce @`m��h=���W@���l����M@�X� @���� +l�wiuV�������N��u�v�Ã��Ã�f?�I����%������+I����� �O����t% @�@���=� @�@�����$���'�>�Е$@���@��'@��@��� @ Z@����� @ @@�@W��D��P����J @���h z� @���� �]I - �DO@} ��+I����� �O����t% @�@���=� @�@�����$���'�>�Е$@���@��'@��@��� @ Z@����� @ @@�@W��D��P��l����"ʆ�|��幵��糜�~�����oo����_�x����x�.�W�ux�ƍ��ӟM�{��_�\�:k�g�ҍ���W+X���NN_��6��7oM{������3<x�p�k_�A�{����*/���?�����B{�B��(jŢ~�B�#�)z�%@��� +��β @��`��{ @�@�@���l 0E@����^ Щ�����,��L��蹗�t*�E@Y}��7����]t��3x�{;��~{f���������U��ڷ�1|��f����?���?���.s~f=��֢�@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Z@K�q �X@�H<\� @������Вq��$�Wk @�% ��d'@�������h �-� @�@b �p�F��Zۭ�ǯ��(��ڗ����K�ۗ�� ~V������l�{�oX�:�ߢ��|��ku;������z'���}�ky��xU�7��O��Nj@�����'�>�Е$@���@��'@��@��� @ Z@����� @ @@�@W��D��P��l���ꮭ�������A��{�������y',+�{��p|tԼ����Ý���y'�X��~k��l����%� @���d@��j�����(���$�� T; @`���0F�5 @ ����l��!@��c�1J�!@����d�# ��Qr H& �$�v @��`��k @�@2 �@�C����c�\C��� ��� 0F@��� �L@�H6P� @���1�%� @���d@��j�����(���$�� T; @`�����\3^���h�Ů\������<�LJ�|�rx��=.��5W�s����s^�x�����ׯ�����b�ݻ�V�D��H�ɳ�]����7d{n�㭺���˿������� +�>��,U#@����f1� @����6�����0�1Xج���Yo� @��,�Y��" @��f��z�F��f!�{�6<����p��n�j��?�6��F� �`�O���V�����j�O~:�}�@�;o��Ͱ��F�0����U&@��a@�� @ N@���W��� �a� + @���8 �^e & ���+L����8{� @�@���F�0����U&@��a@�� @ N@���W��� �a� + @���8 �^e & ���+L����8{� @�@���F�0����U&@��a@�� @ N@���W��� �a� + @���8 �^e & ���+L����8{� @�@���F�0�؎+S���`X�xؔ���{�*�Nq�㣣���[��?V�;�c�\G�� ���� 0V@�+�: �H@�H4L� @�����X)� @���D@�aj�����J���$(�=�{�����������]m�~���pggg-�_��o�3��Y>t���<{���^[�9���1G] @�������\L��r�9� ������� @�@ �uA������r1�! �䘣. @��R�R\.&@��9�s�XJ@�X��� @ ����c�� @��K �Kq�����r�Q @`)`). @���@�9��,% �,��b �C@��1G] @�������\L��r�9� ������� @�@ �uA������r1�! �䘣. @��R�R\.&@��9�s��O�?���bg�R^Ӈp����)�{���~�b{��.��;� �������\u��wިN�� ��?�6,~���@s�J �R`��F�������U @���� +�+��0 Ї���ǜ����T@�X)�� @���>�>�d� @`��`�������?�������smgV,����?��"���6����%@���@��� @ H@��W��D +���j @��� ^Y ) �D�M���� xe @�@�����6����%@���@��� @ H@��W��D +���j @��� ^Y ) �D�M���� xe @�@�����6����%@���@��� @ H@��W��D +���j @��� ^Y ) �D�M���� xe @�@��vd�o���Y�����Y�o��;>:v��[g �>C��;�áN����,��L��蹗�t* �t:8�&@��S�)z�%@��� +��β @��`��{ @�@�@���l 0E���LѻĽ��o��/.qg�[tux���k6���|��+zR���s5��a�6��������\e�����N�-�#���3 @ ����v�#@��m�m�H+ ���� @�@[@�h�8C��� +�iG�1 ���6� @����@��j������3 @ ����v�#@��m�m�H+ ���� @�@[@�h�8C��� +�iG�1 ���6� @����@��j������3 @ ����v�#@��m�m�H+ ���� @�@[@�h�8C��� +�iG�1 ���6� @����@��j����ۧr�9<8?^6%�{�ަJ�C�����M�B �G@��3K� @�����h* @���<@�Y����FS����#prrr�b�sy�$@��9��s����t���X�D�nUZ� ��U�㣣����+L�k��t=>�'@����.��. 0k��?���� ���8I�������]��p.�� @�O�ϹY5�&�{������t)��u�}p.�� @�O�+@���j 0I@����f �R�G�)Ǫ)�.p���ğ���� @�@�@���l 0E`��` +�{ @�@N䜫� @���w��o�� @�����p��c @�s��t>@�'@�����:T=���\@����,���C@�X��g @�����3�� @���u��P�L 0s`��< �`��I���NNN�]���g�\��㏮�����k�t�?�6�!��`�v�V� o�w�{}���.���� �O��>8�! �]@��>a� @�@I�_�%Ǯi�. �T��'@��g��� @�@v ���G�����@q��d�:����*(��� @�@A���� @���` @����@��k�����(( ��� @���` @����@��k�����(( ��� @���` @����@��k�����(( ��� @���` @����@��k�����(( ��� @���` @����@��k�����(( ��� @���` @����@��k�����(( ��� @���` @����@��k�����(( ��� @���` @����@��k�����(( ��� @���` @����@��k���/� \�yoU8����IEND�B`� \ No newline at end of file diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/simple_sitemap_engines.info.yml b/web/modules/simple_sitemap/modules/simple_sitemap_engines/simple_sitemap_engines.info.yml index 0ee9d23d2cce598bba96d3e07f8ad22d520a5016..74bb2d29e41172c01a6e047629cab3bbb7dd5949 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/simple_sitemap_engines.info.yml +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/simple_sitemap_engines.info.yml @@ -3,11 +3,11 @@ type: module description: 'Submits sitemaps to search engines and notifies IndexNow compatible engines about changes to entities.' configure: simple_sitemap_engines.settings package: SEO -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^10.2 || ^11 dependencies: - simple_sitemap:simple_sitemap -# Information added by Drupal.org packaging script on 2024-04-06 -version: '4.1.9' +# Information added by Drupal.org packaging script on 2024-08-16 +version: '4.2.1' project: 'simple_sitemap' -datestamp: 1712441540 +datestamp: 1723801802 diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Controller/IndexNowController.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Controller/IndexNowController.php index 3856bddced860b5a90ff698415c8504ad45b5a43..5a68510e71d83a51afe4b521b200e4bcf912ed8a 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Controller/IndexNowController.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Controller/IndexNowController.php @@ -5,9 +5,9 @@ use Drupal\Core\Controller\ControllerBase; use Drupal\simple_sitemap_engines\Submitter\IndexNowSubmitter; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpFoundation\Request; /** * Controller routines for IndexNow routes. diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/FormHelper.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/FormHelper.php index f062619998f2258d249f66819f3fa602c90fab1d..b831631e200d5a9137df0e1f0727a9cdce554f50 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/FormHelper.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/FormHelper.php @@ -2,13 +2,13 @@ namespace Drupal\simple_sitemap_engines\Form; -use Drupal\Core\DependencyInjection\ClassResolverInterface; -use Drupal\Core\Session\AccountProxyInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\DependencyInjection\ClassResolverInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; -use Drupal\simple_sitemap\Form\FormHelper as BaseFormHelper; +use Drupal\Core\Session\AccountProxyInterface; use Drupal\simple_sitemap\Entity\EntityHelper; +use Drupal\simple_sitemap\Form\FormHelper as BaseFormHelper; use Drupal\simple_sitemap\Manager\Generator; use Drupal\simple_sitemap\Settings; use Drupal\simple_sitemap_engines\Form\Handler\BundleEntityFormHandler; @@ -51,7 +51,7 @@ public function __construct( EntityHelper $entity_helper, AccountProxyInterface $current_user, ClassResolverInterface $class_resolver, - ConfigFactoryInterface $config_factory + ConfigFactoryInterface $config_factory, ) { parent::__construct($generator, $settings, $entity_helper, $current_user, $class_resolver); $this->configFactory = $config_factory; diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/Handler/EntityFormHandlerBase.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/Handler/EntityFormHandlerBase.php index 6b72f2a029fac0211ceebd88de58a03754de6c1a..a24c4c1fa4132b5d654a2a6a941c274d906f8ae8 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/Handler/EntityFormHandlerBase.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/Handler/EntityFormHandlerBase.php @@ -2,13 +2,13 @@ namespace Drupal\simple_sitemap_engines\Form\Handler; -use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\simple_sitemap\Form\Handler\EntityFormHandlerBase as BaseEntityFormHandlerBase; -use Drupal\simple_sitemap\Form\FormHelper; use Drupal\simple_sitemap\Entity\EntityHelper; +use Drupal\simple_sitemap\Form\FormHelper; +use Drupal\simple_sitemap\Form\Handler\EntityFormHandlerBase as BaseEntityFormHandlerBase; use Drupal\simple_sitemap\Manager\Generator; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Defines a base class for altering an entity form. diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/SimplesitemapEnginesForm.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/SimplesitemapEnginesForm.php index c1a82c7934bfb766222a4ab196981f10abf79144..112dc92ca54f490752ecd5acf8b8c8a091002a25 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/SimplesitemapEnginesForm.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Form/SimplesitemapEnginesForm.php @@ -3,6 +3,7 @@ namespace Drupal\simple_sitemap_engines\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Datetime\DateFormatter; use Drupal\Core\Entity\EntityFieldManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; @@ -55,6 +56,8 @@ class SimplesitemapEnginesForm extends ConfigFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager + * The typed config manager. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * The entity type manager service. * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager @@ -64,12 +67,15 @@ class SimplesitemapEnginesForm extends ConfigFormBase { * @param \Drupal\Core\State\StateInterface $state * The state service. */ - public function __construct(ConfigFactoryInterface $config_factory, - EntityTypeManagerInterface $entity_type_manager, - EntityFieldManagerInterface $entity_field_manager, - DateFormatter $date_formatter, - StateInterface $state) { - parent::__construct($config_factory); + public function __construct( + ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typedConfigManager, + EntityTypeManagerInterface $entity_type_manager, + EntityFieldManagerInterface $entity_field_manager, + DateFormatter $date_formatter, + StateInterface $state, + ) { + parent::__construct($config_factory, $typedConfigManager); $this->entityTypeManager = $entity_type_manager; $this->entityFieldManager = $entity_field_manager; $this->dateFormatter = $date_formatter; @@ -82,6 +88,7 @@ public function __construct(ConfigFactoryInterface $config_factory, public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('entity_type.manager'), $container->get('entity_field.manager'), $container->get('date.formatter'), diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/PathProcessor/IndexNowPathProcessor.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/PathProcessor/IndexNowPathProcessor.php index a9e06e48395b5f88c6e39fd8855137664e8e7e95..507aa04e129f059e1ce91b42abd53166f0c153f8 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/PathProcessor/IndexNowPathProcessor.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/PathProcessor/IndexNowPathProcessor.php @@ -2,8 +2,8 @@ namespace Drupal\simple_sitemap_engines\PathProcessor; -use Drupal\simple_sitemap_engines\Submitter\IndexNowSubmitter; use Drupal\Core\PathProcessor\InboundPathProcessorInterface; +use Drupal\simple_sitemap_engines\Submitter\IndexNowSubmitter; use Symfony\Component\HttpFoundation\Request; /** diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Plugin/QueueWorker/SitemapSubmittingWorker.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Plugin/QueueWorker/SitemapSubmittingWorker.php index a480722493bd9a83f9145d8b0a298f27f464c37c..4cc3f6ff2d878f22d6780b697121d14463050160 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Plugin/QueueWorker/SitemapSubmittingWorker.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Plugin/QueueWorker/SitemapSubmittingWorker.php @@ -39,10 +39,12 @@ class SitemapSubmittingWorker extends QueueWorkerBase implements ContainerFactor * @param \Drupal\simple_sitemap_engines\Submitter\SitemapSubmitter $sitemap_submitter * Sitemap submitter service. */ - public function __construct(array $configuration, - $plugin_id, - array $plugin_definition, - SitemapSubmitter $sitemap_submitter) { + public function __construct( + array $configuration, + $plugin_id, + array $plugin_definition, + SitemapSubmitter $sitemap_submitter, + ) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->sitemapSubmitter = $sitemap_submitter; } diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/SearchEngineListBuilder.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/SearchEngineListBuilder.php index 21c1f0aa1c25d97709e181190eb7e40708543416..2f28708b5994c43690a3c5362e8f6be0f349d4af 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/SearchEngineListBuilder.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/SearchEngineListBuilder.php @@ -52,11 +52,13 @@ class SearchEngineListBuilder extends ConfigEntityListBuilder { * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. */ - public function __construct(EntityTypeInterface $entity_type, - EntityStorageInterface $storage, - DateFormatterInterface $date_formatter, - StateInterface $state, - ConfigFactoryInterface $config_factory) { + public function __construct( + EntityTypeInterface $entity_type, + EntityStorageInterface $storage, + DateFormatterInterface $date_formatter, + StateInterface $state, + ConfigFactoryInterface $config_factory, + ) { parent::__construct($entity_type, $storage); $this->dateFormatter = $date_formatter; $this->state = $state; diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Submitter/SubmitterBase.php b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Submitter/SubmitterBase.php index b32228bf55b33680124a89030a83358f58fce93b..65b54cb058afc71dfd1b2998748e23108274d371 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Submitter/SubmitterBase.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_engines/src/Submitter/SubmitterBase.php @@ -4,7 +4,9 @@ use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Logger\LoggerChannelTrait; use Drupal\Core\State\StateInterface; +use Drupal\Core\Utility\Error; use Drupal\simple_sitemap\Logger; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; @@ -14,6 +16,8 @@ */ abstract class SubmitterBase { + use LoggerChannelTrait; + /** * The HTTP Client service. * @@ -70,11 +74,13 @@ abstract class SubmitterBase { * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(ClientInterface $http_client, - Logger $logger, - StateInterface $state, - TimeInterface $time, - ConfigFactoryInterface $config_factory) { + public function __construct( + ClientInterface $http_client, + Logger $logger, + StateInterface $state, + TimeInterface $time, + ConfigFactoryInterface $config_factory, + ) { $this->httpClient = $http_client; $this->logger = $logger; $this->state = $state; @@ -101,7 +107,8 @@ protected function request(string $url): bool { return TRUE; } catch (TransferException $e) { - watchdog_exception('simple_sitemap_engines', $e); + $logger = $this->getLogger('simple_sitemap_engines'); + Error::logException($logger, $e); $this->onFailure(); return FALSE; } diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/js/simple_sitemap.viewsUi.js b/web/modules/simple_sitemap/modules/simple_sitemap_views/js/simple_sitemap.viewsUi.js index 3054f613fa15a83a53f96bed83657e7e58b4c39a..d8ae5d99efb9d689a60a1ddddf1eab407990924c 100755 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/js/simple_sitemap.viewsUi.js +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/js/simple_sitemap.viewsUi.js @@ -1,55 +1,63 @@ /** * @file - * Views UI helpers for Simple XML Sitemap display extender. + * Attaches behaviors for the Simple XML Sitemap display extender. */ -(($, Drupal, once) => { - Drupal.simpleSitemapViewsUi = {}; - +((Drupal, once) => { + /** + * The behavior of the indexed arguments. + * + * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches the behavior to the indexed arguments. + */ Drupal.behaviors.simpleSitemapViewsUiArguments = { - attach() { - const $arguments = $( - once('simple-sitemap-views-ui-arguments', '.indexed-arguments'), - ); - - if ($arguments.length) { - $arguments.each(function each() { - const $checkboxes = $(this).find('input[type="checkbox"]'); - - if ($checkboxes.length) { - // eslint-disable-next-line no-new - new Drupal.simpleSitemapViewsUi.Arguments($checkboxes); - } + attach(context) { + once( + 'simple-sitemap-views-ui-arguments', + 'fieldset.indexed-arguments', + context, + ).forEach((element) => { + let checkboxes = element.querySelectorAll('input[type="checkbox"]'); + checkboxes = Array.from(checkboxes); + + /** + * Mark all checkboxes above the current one as checked. + * + * @param {number} index + * The index of the current checkbox. + */ + const check = (index) => { + checkboxes.slice(0, index).forEach((checkbox) => { + checkbox.checked = true; + }); + }; + + /** + * Mark all checkboxes below the current one as unchecked. + * + * @param {number} index + * The index of the current checkbox. + */ + const uncheck = (index) => { + checkboxes.slice(index).forEach((checkbox) => { + checkbox.checked = false; + }); + }; + + checkboxes.forEach((checkbox) => { + checkbox.addEventListener('change', () => { + const index = checkboxes.indexOf(checkbox); + + if (checkbox.checked) { + check(index); + } else { + uncheck(index); + } + }); }); - } + }); }, }; - - // eslint-disable-next-line func-names - Drupal.simpleSitemapViewsUi.Arguments = function ($checkboxes) { - this.$checkboxes = $checkboxes; - this.$checkboxes.on('change', $.proxy(this, 'changeHandler')); - }; - - // eslint-disable-next-line func-names - Drupal.simpleSitemapViewsUi.Arguments.prototype.changeHandler = function (e) { - const $checkbox = $(e.target); - const index = this.$checkboxes.index($checkbox); - - if ($checkbox.prop('checked')) { - this.check(index); - } else { - this.uncheck(index); - } - }; - - // eslint-disable-next-line func-names - Drupal.simpleSitemapViewsUi.Arguments.prototype.check = function (index) { - this.$checkboxes.slice(0, index).prop('checked', true); - }; - - // eslint-disable-next-line func-names - Drupal.simpleSitemapViewsUi.Arguments.prototype.uncheck = function (index) { - this.$checkboxes.slice(index).prop('checked', false); - }; -})(jQuery, Drupal, once); +})(Drupal, once); diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.info.yml b/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.info.yml index 6183d2cd892dfea8d80b060d914467be461892bc..66fdd675080a02ac747131f0a40c00bd1b51b42f 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.info.yml +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.info.yml @@ -3,12 +3,12 @@ type: module description: 'Provides integration of the Simple XML Sitemap module with the Views module.' configure: simple_sitemap.settings_views package: SEO -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^10.2 || ^11 dependencies: - simple_sitemap:simple_sitemap - drupal:views -# Information added by Drupal.org packaging script on 2024-04-06 -version: '4.1.9' +# Information added by Drupal.org packaging script on 2024-08-16 +version: '4.2.1' project: 'simple_sitemap' -datestamp: 1712441540 +datestamp: 1723801802 diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.libraries.yml b/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.libraries.yml index 8b042f2d07af374a01521eb9d0f20d88b2538f7d..3d734e68777a386038d32f31634d415dcee391e9 100755 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.libraries.yml +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/simple_sitemap_views.libraries.yml @@ -3,6 +3,5 @@ viewsUi: js: js/simple_sitemap.viewsUi.js: {} dependencies: - - core/jquery - core/drupal - core/once diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Controller/SimpleSitemapViewsController.php b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Controller/SimpleSitemapViewsController.php index 97259db4e375ad7454a9dd81d50d0a21283500ba..64a834095054e2be2248d59c6635c881611fc06b 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Controller/SimpleSitemapViewsController.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Controller/SimpleSitemapViewsController.php @@ -2,10 +2,10 @@ namespace Drupal\simple_sitemap_views\Controller; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\simple_sitemap_views\SimpleSitemapViews; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Url; +use Drupal\simple_sitemap_views\SimpleSitemapViews; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Controller for Simple XML Sitemap Views admin page. diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/EventSubscriber/ArgumentCollector.php b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/EventSubscriber/ArgumentCollector.php index 6e92145884389ebdbc8afd6d13398b9d5cf01c21..e45617d6fb69c7d87f3a91cc9126f225fe1646f7 100755 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/EventSubscriber/ArgumentCollector.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/EventSubscriber/ArgumentCollector.php @@ -2,12 +2,12 @@ namespace Drupal\simple_sitemap_views\EventSubscriber; -use Symfony\Component\HttpKernel\Event\TerminateEvent; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Drupal\simple_sitemap_views\SimpleSitemapViews; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Symfony\Component\HttpKernel\KernelEvents; use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\simple_sitemap_views\SimpleSitemapViews; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\Event\TerminateEvent; +use Symfony\Component\HttpKernel\KernelEvents; /** * Collect information about views arguments. @@ -54,7 +54,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Sim /** * {@inheritdoc} */ - public static function getSubscribedEvents() { + public static function getSubscribedEvents(): array { $events[KernelEvents::TERMINATE] = 'onTerminate'; return $events; } diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/QueueWorker/GarbageCollector.php b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/QueueWorker/GarbageCollector.php index d8b864e9ff2882f9c4d9b1caf0b73bbf92d16689..1c56da7c6da9700a4273f7e33311f30ce9813a2f 100755 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/QueueWorker/GarbageCollector.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/QueueWorker/GarbageCollector.php @@ -2,12 +2,12 @@ namespace Drupal\simple_sitemap_views\Plugin\QueueWorker; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Drupal\simple_sitemap_views\SimpleSitemapViews; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Database\Database; +use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Queue\QueueWorkerBase; +use Drupal\simple_sitemap_views\SimpleSitemapViews; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Executes garbage collection in the simple_sitemap_views table. diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/simple_sitemap/UrlGenerator/ViewsUrlGenerator.php b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/simple_sitemap/UrlGenerator/ViewsUrlGenerator.php index 46fc1608d60dd884c1a6ba5c34a5cadf26ef7616..ceb7db8d0c6d5ebeae421bbae4d3029b862bfa5d 100755 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/simple_sitemap/UrlGenerator/ViewsUrlGenerator.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/simple_sitemap/UrlGenerator/ViewsUrlGenerator.php @@ -2,20 +2,20 @@ namespace Drupal\simple_sitemap_views\Plugin\simple_sitemap\UrlGenerator; -use Drupal\simple_sitemap\Exception\SkipElementException; -use Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase; -use Drupal\simple_sitemap\Plugin\simple_sitemap\SimpleSitemapPluginBase; -use Drupal\simple_sitemap\Settings; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\simple_sitemap_views\SimpleSitemapViews; -use Drupal\Core\Language\LanguageManagerInterface; +use Drupal\Core\Database\Database; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Routing\RouteProviderInterface; -use Drupal\Core\Database\Database; +use Drupal\Core\Url; use Drupal\simple_sitemap\Entity\EntityHelper; +use Drupal\simple_sitemap\Exception\SkipElementException; use Drupal\simple_sitemap\Logger; +use Drupal\simple_sitemap\Plugin\simple_sitemap\SimpleSitemapPluginBase; +use Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase; +use Drupal\simple_sitemap\Settings; +use Drupal\simple_sitemap_views\SimpleSitemapViews; use Drupal\views\Views; -use Drupal\Core\Url; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Views URL generator plugin. @@ -76,7 +76,7 @@ public function __construct( EntityTypeManagerInterface $entity_type_manager, EntityHelper $entity_helper, SimpleSitemapViews $sitemap_views, - RouteProviderInterface $route_provider + RouteProviderInterface $route_provider, ) { parent::__construct( $configuration, diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/views/display_extender/SimpleSitemapDisplayExtender.php b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/views/display_extender/SimpleSitemapDisplayExtender.php index 586e226c83348827c346a9da105e3d8d34ec8b08..c34fa3809f7485416e524c579cf53448b19044f3 100755 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/views/display_extender/SimpleSitemapDisplayExtender.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/Plugin/views/display_extender/SimpleSitemapDisplayExtender.php @@ -2,14 +2,14 @@ namespace Drupal\simple_sitemap_views\Plugin\views\display_extender; -use Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\views\Plugin\views\display\DisplayRouterInterface; -use Drupal\views\Plugin\views\display\DisplayPluginBase; -use Drupal\simple_sitemap_views\SimpleSitemapViews; -use Drupal\simple_sitemap\Form\FormHelper; use Drupal\Core\Form\FormStateInterface; +use Drupal\simple_sitemap\Form\FormHelper; +use Drupal\simple_sitemap_views\SimpleSitemapViews; +use Drupal\views\Plugin\views\display\DisplayPluginBase; +use Drupal\views\Plugin\views\display\DisplayRouterInterface; +use Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase; use Drupal\views\ViewExecutable; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Simple XML Sitemap display extender plugin. diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/SimpleSitemapViews.php b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/SimpleSitemapViews.php index de0494334d89dd76115322f92f0b0d288ea2bde7..0f8e09755135904b89976cb3a81db83487ed8e09 100755 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/src/SimpleSitemapViews.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/src/SimpleSitemapViews.php @@ -80,7 +80,7 @@ public function __construct( EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, QueueFactory $queue_factory, - Connection $database + Connection $database, ) { $this->viewStorage = $entity_type_manager->getStorage('view'); $this->configFactory = $config_factory; diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/config/install/views.view.simple_sitemap_views_test_view.yml b/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/config/install/views.view.simple_sitemap_views_test_view.yml index 6c28a2d45bbfc876cd88620039903c02a57713de..d6d8aecebc6926592bbe92b05fec3f164d4e4c22 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/config/install/views.view.simple_sitemap_views_test_view.yml +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/config/install/views.view.simple_sitemap_views_test_view.yml @@ -142,7 +142,6 @@ display: default_argument_type: fixed default_argument_options: argument: '' - default_argument_skip_url: false summary_options: base_path: '' count: true @@ -165,7 +164,7 @@ display: break_phrase: false entity_type: node entity_field: type - plugin_id: node_type + plugin_id: entity_bundle:node title: id: title table: node_field_data @@ -183,7 +182,6 @@ display: default_argument_type: fixed default_argument_options: argument: '' - default_argument_skip_url: false summary_options: base_path: '' count: true @@ -224,7 +222,6 @@ display: default_argument_type: fixed default_argument_options: argument: '' - default_argument_skip_url: false summary_options: base_path: '' count: true @@ -316,7 +313,6 @@ display: default_argument_type: fixed default_argument_options: argument: '' - default_argument_skip_url: false summary_options: base_path: '' count: true @@ -339,7 +335,7 @@ display: break_phrase: false entity_type: node entity_field: type - plugin_id: node_type + plugin_id: entity_bundle:node defaults: arguments: false cache_metadata: diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/simple_sitemap_views_test.info.yml b/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/simple_sitemap_views_test.info.yml index 33c599b99ccd4db55f1eddde6b04369620a0cd2b..1623e50b744517804f7c6996035e6295e13817f2 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/simple_sitemap_views_test.info.yml +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/modules/simple_sitemap_views_test/simple_sitemap_views_test.info.yml @@ -5,7 +5,7 @@ package: Testing dependencies: - simple_sitemap:simple_sitemap_views -# Information added by Drupal.org packaging script on 2024-04-06 -version: '4.1.9' +# Information added by Drupal.org packaging script on 2024-08-16 +version: '4.2.1' project: 'simple_sitemap' -datestamp: 1712441540 +datestamp: 1723801802 diff --git a/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/src/Functional/SimpleSitemapViewsTestBase.php b/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/src/Functional/SimpleSitemapViewsTestBase.php index c29cabf0ba65d4232b3e1598fda0c6e3ed923113..f35d05477859d32992fef5f51f17eebd03f9e8eb 100644 --- a/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/src/Functional/SimpleSitemapViewsTestBase.php +++ b/web/modules/simple_sitemap/modules/simple_sitemap_views/tests/src/Functional/SimpleSitemapViewsTestBase.php @@ -3,8 +3,8 @@ namespace Drupal\Tests\simple_sitemap_views\Functional; use Drupal\simple_sitemap\Entity\SimpleSitemapType; -use Drupal\Tests\simple_sitemap\Functional\SimplesitemapTestBase; use Drupal\simple_sitemap_views\SimpleSitemapViews; +use Drupal\Tests\simple_sitemap\Functional\SimplesitemapTestBase; use Drupal\views\Views; /** diff --git a/web/modules/simple_sitemap/phpcs.xml.dist b/web/modules/simple_sitemap/phpcs.xml.dist index 5f893ab5e55af50d3805895209056073f06c0452..96683117b8fb56f1e190b8a2be656e9c7f3c5542 100644 --- a/web/modules/simple_sitemap/phpcs.xml.dist +++ b/web/modules/simple_sitemap/phpcs.xml.dist @@ -5,10 +5,7 @@ <config name="drupal_core_version" value="8"/> <file>.</file> - <rule ref="Drupal"> - <!-- Present in many places, ignore for now. --> - <exclude name="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/> - </rule> + <rule ref="Drupal"/> <rule ref="DrupalPractice"/> <!-- Update hooks may have long descriptions. --> <rule ref="Drupal.Files.LineLength.TooLong"> diff --git a/web/modules/simple_sitemap/phpstan-baseline.neon b/web/modules/simple_sitemap/phpstan-baseline.neon index a5f6c9287b132fc912e1578fa66b931d09966bc8..7cd4773c220b8c6109d01b4732857daefd79d380 100644 --- a/web/modules/simple_sitemap/phpstan-baseline.neon +++ b/web/modules/simple_sitemap/phpstan-baseline.neon @@ -5,15 +5,6 @@ parameters: count: 1 path: modules/simple_sitemap_engines/src/Form/Handler/EntityFormHandler.php - - - message: """ - #^Call to deprecated function watchdog_exception\\(\\)\\: - in drupal\\:10\\.1\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use - Use \\\\Drupal\\\\Core\\\\Utility\\\\Error\\:\\:logException\\(\\) instead\\.$# - """ - count: 1 - path: modules/simple_sitemap_engines/src/Submitter/SubmitterBase.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" count: 1 @@ -54,15 +45,6 @@ parameters: count: 1 path: src/Plugin/simple_sitemap/UrlGenerator/SitemapIndexUrlGenerator.php - - - message: """ - #^Call to deprecated function watchdog_exception\\(\\)\\: - in drupal\\:10\\.1\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use - Use \\\\Drupal\\\\Core\\\\Utility\\\\Error\\:\\:logException\\(\\) instead\\.$# - """ - count: 1 - path: src/Queue/QueueWorker.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" count: 2 diff --git a/web/modules/simple_sitemap/simple_sitemap.info.yml b/web/modules/simple_sitemap/simple_sitemap.info.yml index 0016141753ce912a4e429cfef53b5122a6ec3e38..cd544a9411d63b589fbf592192b6267d8de37695 100644 --- a/web/modules/simple_sitemap/simple_sitemap.info.yml +++ b/web/modules/simple_sitemap/simple_sitemap.info.yml @@ -3,9 +3,9 @@ type: module description: 'Generates standard conform hreflang XML sitemaps of the site content and provides a framework for developing other sitemap types.' configure: entity.simple_sitemap.collection package: SEO -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^10.2 || ^11 -# Information added by Drupal.org packaging script on 2024-04-06 -version: '4.1.9' +# Information added by Drupal.org packaging script on 2024-08-16 +version: '4.2.1' project: 'simple_sitemap' -datestamp: 1712441540 +datestamp: 1723801802 diff --git a/web/modules/simple_sitemap/simple_sitemap.libraries.yml b/web/modules/simple_sitemap/simple_sitemap.libraries.yml index c3c4b9c79c4b0ce6b850d7793dff31b218bbad8e..72a3acaf2e52f1b82f60efc84153dc72f03b470a 100644 --- a/web/modules/simple_sitemap/simple_sitemap.libraries.yml +++ b/web/modules/simple_sitemap/simple_sitemap.libraries.yml @@ -11,9 +11,9 @@ sitemapEntities: js: js/simple_sitemap.sitemapEntities.js: {} dependencies: - - core/jquery - core/drupal - core/once + - core/drupal.message sitemaps: version: VERSION diff --git a/web/modules/simple_sitemap/simple_sitemap.module b/web/modules/simple_sitemap/simple_sitemap.module index 203b82a162ab2cbc709fbdbc7440fdc838bf0125..e70bff097da0754e2e770ace4ffa99f6ba55ac44 100644 --- a/web/modules/simple_sitemap/simple_sitemap.module +++ b/web/modules/simple_sitemap/simple_sitemap.module @@ -5,12 +5,12 @@ * Main module file containing hooks. */ -use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\language\ConfigurableLanguageInterface; use Drupal\simple_sitemap\Queue\QueueWorker; use Drupal\system\MenuInterface; -use Drupal\language\ConfigurableLanguageInterface; /** * Implements hook_help(). diff --git a/web/modules/simple_sitemap/simple_sitemap.post_update.php b/web/modules/simple_sitemap/simple_sitemap.post_update.php index a258d9358b784021615648b12ca309352606f10a..a65e43ba8e5ad5c924cee6be791321ba54cf29c5 100644 --- a/web/modules/simple_sitemap/simple_sitemap.post_update.php +++ b/web/modules/simple_sitemap/simple_sitemap.post_update.php @@ -25,3 +25,12 @@ function simple_sitemap_post_update_8403(&$sandbox) { } } } + + +/** + * Clear cache as service definitions changed. + * + * @see https://www.drupal.org/project/simple_sitemap/issues/3444946 + */ +function simple_sitemap_post_update_8404(array &$sandbox = NULL): void { +} diff --git a/web/modules/simple_sitemap/src/Commands/SimpleSitemapCommands.php b/web/modules/simple_sitemap/src/Commands/SimpleSitemapCommands.php index ede6b6a2918812dcf8bf073a975328d37193bac2..47bb5700dc089d36d129b226ae6c8389fe45fd0a 100644 --- a/web/modules/simple_sitemap/src/Commands/SimpleSitemapCommands.php +++ b/web/modules/simple_sitemap/src/Commands/SimpleSitemapCommands.php @@ -3,8 +3,8 @@ namespace Drupal\simple_sitemap\Commands; use Drupal\simple_sitemap\Entity\SimpleSitemap; -use Drupal\simple_sitemap\Queue\QueueWorker; use Drupal\simple_sitemap\Manager\Generator; +use Drupal\simple_sitemap\Queue\QueueWorker; use Drush\Commands\DrushCommands; /** diff --git a/web/modules/simple_sitemap/src/Entity/SimpleSitemapStorage.php b/web/modules/simple_sitemap/src/Entity/SimpleSitemapStorage.php index 9fbdff9b87277c2621c23269ee00ee944286ca85..dfd12b7736ddbd588a43085aed86ab6b7078c9b6 100644 --- a/web/modules/simple_sitemap/src/Entity/SimpleSitemapStorage.php +++ b/web/modules/simple_sitemap/src/Entity/SimpleSitemapStorage.php @@ -3,11 +3,11 @@ namespace Drupal\simple_sitemap\Entity; use Drupal\Component\Datetime\TimeInterface; +use Drupal\Component\Uuid\UuidInterface; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface; -use Drupal\Core\Config\Entity\ConfigEntityStorage; -use Drupal\Component\Uuid\UuidInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\Entity\ConfigEntityStorage; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; diff --git a/web/modules/simple_sitemap/src/Entity/SimpleSitemapTypeStorage.php b/web/modules/simple_sitemap/src/Entity/SimpleSitemapTypeStorage.php index e7683d6ff9113c007337628ae3b902ac36a7fa0b..9ad8b8e8b2a5cb7d0f502e961bef63a4fc717a59 100644 --- a/web/modules/simple_sitemap/src/Entity/SimpleSitemapTypeStorage.php +++ b/web/modules/simple_sitemap/src/Entity/SimpleSitemapTypeStorage.php @@ -2,10 +2,10 @@ namespace Drupal\simple_sitemap\Entity; -use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface; -use Drupal\Core\Config\Entity\ConfigEntityStorage; use Drupal\Component\Uuid\UuidInterface; +use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\Entity\ConfigEntityStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; diff --git a/web/modules/simple_sitemap/src/Form/CustomLinksForm.php b/web/modules/simple_sitemap/src/Form/CustomLinksForm.php index fde57313cb3458fd0c8c1cd434d46da4bec32a60..14d83ab69988353daedddcd696434f7b6f560fd1 100644 --- a/web/modules/simple_sitemap/src/Form/CustomLinksForm.php +++ b/web/modules/simple_sitemap/src/Form/CustomLinksForm.php @@ -3,6 +3,7 @@ namespace Drupal\simple_sitemap\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Path\PathValidatorInterface; use Drupal\simple_sitemap\Manager\Generator; @@ -26,6 +27,8 @@ class CustomLinksForm extends SimpleSitemapFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager + * The typed config manager. * @param \Drupal\simple_sitemap\Manager\Generator $generator * The sitemap generator service. * @param \Drupal\simple_sitemap\Settings $settings @@ -37,13 +40,15 @@ class CustomLinksForm extends SimpleSitemapFormBase { */ public function __construct( ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typedConfigManager, Generator $generator, Settings $settings, FormHelper $form_helper, - PathValidatorInterface $path_validator + PathValidatorInterface $path_validator, ) { parent::__construct( $config_factory, + $typedConfigManager, $generator, $settings, $form_helper @@ -57,6 +62,7 @@ public function __construct( public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('simple_sitemap.generator'), $container->get('simple_sitemap.settings'), $container->get('simple_sitemap.form_helper'), diff --git a/web/modules/simple_sitemap/src/Form/EntitiesForm.php b/web/modules/simple_sitemap/src/Form/EntitiesForm.php index acf2025484cf05cc9c128d58219ea0fa0a1c20aa..50cbeb76568c14b2a450b81613b016f58bd766a5 100644 --- a/web/modules/simple_sitemap/src/Form/EntitiesForm.php +++ b/web/modules/simple_sitemap/src/Form/EntitiesForm.php @@ -2,15 +2,16 @@ namespace Drupal\simple_sitemap\Form; -use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; +use Drupal\simple_sitemap\Entity\EntityHelper; +use Drupal\simple_sitemap\Entity\SimpleSitemap; use Drupal\simple_sitemap\Manager\EntityManager; use Drupal\simple_sitemap\Manager\Generator; -use Drupal\simple_sitemap\Entity\SimpleSitemap; -use Drupal\simple_sitemap\Entity\EntityHelper; use Drupal\simple_sitemap\Settings; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides form to manage entity settings. @@ -36,6 +37,8 @@ class EntitiesForm extends SimpleSitemapFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager + * The typed config manager. * @param \Drupal\simple_sitemap\Manager\Generator $generator * The sitemap generator service. * @param \Drupal\simple_sitemap\Settings $settings @@ -49,14 +52,16 @@ class EntitiesForm extends SimpleSitemapFormBase { */ public function __construct( ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typedConfigManager, Generator $generator, Settings $settings, FormHelper $form_helper, EntityHelper $entity_helper, - EntityManager $entity_manager + EntityManager $entity_manager, ) { parent::__construct( $config_factory, + $typedConfigManager, $generator, $settings, $form_helper @@ -71,6 +76,7 @@ public function __construct( public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('simple_sitemap.generator'), $container->get('simple_sitemap.settings'), $container->get('simple_sitemap.form_helper'), diff --git a/web/modules/simple_sitemap/src/Form/EntityBundlesForm.php b/web/modules/simple_sitemap/src/Form/EntityBundlesForm.php index 7b10f13fb5de69ca4f4c2d619bd3136fb2e83802..358dc548de9c8b60832999425fc987cc41147231 100644 --- a/web/modules/simple_sitemap/src/Form/EntityBundlesForm.php +++ b/web/modules/simple_sitemap/src/Form/EntityBundlesForm.php @@ -2,15 +2,16 @@ namespace Drupal\simple_sitemap\Form; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\FormStateInterface; +use Drupal\simple_sitemap\Entity\EntityHelper; use Drupal\simple_sitemap\Manager\EntityManager; use Drupal\simple_sitemap\Manager\Generator; -use Drupal\simple_sitemap\Entity\EntityHelper; use Drupal\simple_sitemap\Settings; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Provides form to manage entity bundles settings. @@ -43,6 +44,8 @@ class EntityBundlesForm extends SimpleSitemapFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager + * The typed config manager. * @param \Drupal\simple_sitemap\Manager\Generator $generator * The sitemap generator service. * @param \Drupal\simple_sitemap\Settings $settings @@ -58,15 +61,17 @@ class EntityBundlesForm extends SimpleSitemapFormBase { */ public function __construct( ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typedConfigManager, Generator $generator, Settings $settings, FormHelper $form_helper, EntityHelper $entity_helper, EntityManager $entity_manager, - EntityTypeManagerInterface $entity_type_manager + EntityTypeManagerInterface $entity_type_manager, ) { parent::__construct( $config_factory, + $typedConfigManager, $generator, $settings, $form_helper @@ -82,6 +87,7 @@ public function __construct( public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('simple_sitemap.generator'), $container->get('simple_sitemap.settings'), $container->get('simple_sitemap.form_helper'), diff --git a/web/modules/simple_sitemap/src/Form/FormHelper.php b/web/modules/simple_sitemap/src/Form/FormHelper.php index d143e8832620617da52849524bf2f26d15c95b4b..d0045462630d428194f36e938e0fe8a5548c83ac 100644 --- a/web/modules/simple_sitemap/src/Form/FormHelper.php +++ b/web/modules/simple_sitemap/src/Form/FormHelper.php @@ -2,19 +2,19 @@ namespace Drupal\simple_sitemap\Form; -use Drupal\Core\DependencyInjection\DependencySerializationTrait; use Drupal\Core\DependencyInjection\ClassResolverInterface; +use Drupal\Core\DependencyInjection\DependencySerializationTrait; use Drupal\Core\Entity\EntityFormInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; +use Drupal\Core\Session\AccountProxyInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\simple_sitemap\Entity\EntityHelper; -use Drupal\simple_sitemap\Form\Handler\EntityFormHandlerInterface; use Drupal\simple_sitemap\Form\Handler\BundleEntityFormHandler; use Drupal\simple_sitemap\Form\Handler\EntityFormHandler; +use Drupal\simple_sitemap\Form\Handler\EntityFormHandlerInterface; use Drupal\simple_sitemap\Manager\Generator; -use Drupal\Core\Session\AccountProxyInterface; use Drupal\simple_sitemap\Settings; /** @@ -92,7 +92,7 @@ public function __construct( Settings $settings, EntityHelper $entity_helper, AccountProxyInterface $current_user, - ClassResolverInterface $class_resolver + ClassResolverInterface $class_resolver, ) { $this->generator = $generator; $this->settings = $settings; diff --git a/web/modules/simple_sitemap/src/Form/Handler/EntityFormHandlerInterface.php b/web/modules/simple_sitemap/src/Form/Handler/EntityFormHandlerInterface.php index a8465d2076c2527e3d95548e4da831e07291a172..1759e25cb697533efbaa0e1952c1febe5e4dad9e 100644 --- a/web/modules/simple_sitemap/src/Form/Handler/EntityFormHandlerInterface.php +++ b/web/modules/simple_sitemap/src/Form/Handler/EntityFormHandlerInterface.php @@ -3,8 +3,8 @@ namespace Drupal\simple_sitemap\Form\Handler; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; -use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Form\FormStateInterface; /** * Defines an interface for altering an entity form. diff --git a/web/modules/simple_sitemap/src/Form/SettingsForm.php b/web/modules/simple_sitemap/src/Form/SettingsForm.php index f3704f42e431fb4994c0875a654f5f31ed0f40b8..ab27d30d5506dbca958119bf5162860dd746ddca 100644 --- a/web/modules/simple_sitemap/src/Form/SettingsForm.php +++ b/web/modules/simple_sitemap/src/Form/SettingsForm.php @@ -2,15 +2,16 @@ namespace Drupal\simple_sitemap\Form; +use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Url; use Drupal\simple_sitemap\Entity\SimpleSitemap; +use Drupal\simple_sitemap\Manager\Generator; use Drupal\simple_sitemap\Settings; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\simple_sitemap\Manager\Generator; -use Drupal\Component\Utility\UrlHelper; -use Drupal\Core\Language\LanguageManagerInterface; /** * Provides form to manage settings. @@ -29,6 +30,8 @@ class SettingsForm extends SimpleSitemapFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager + * The typed config manager. * @param \Drupal\simple_sitemap\Manager\Generator $generator * The sitemap generator service. * @param \Drupal\simple_sitemap\Settings $settings @@ -40,13 +43,15 @@ class SettingsForm extends SimpleSitemapFormBase { */ public function __construct( ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typedConfigManager, Generator $generator, Settings $settings, FormHelper $form_helper, - LanguageManagerInterface $language_manager + LanguageManagerInterface $language_manager, ) { parent::__construct( $config_factory, + $typedConfigManager, $generator, $settings, $form_helper @@ -60,6 +65,7 @@ public function __construct( public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('simple_sitemap.generator'), $container->get('simple_sitemap.settings'), $container->get('simple_sitemap.form_helper'), diff --git a/web/modules/simple_sitemap/src/Form/SimpleSitemapEntityForm.php b/web/modules/simple_sitemap/src/Form/SimpleSitemapEntityForm.php index 2dfa7a666215f1c7bd39cf665e99dec7b0a781af..06505ba0f6affbb3a1f9af52b8f964f0fcd1b74e 100644 --- a/web/modules/simple_sitemap/src/Form/SimpleSitemapEntityForm.php +++ b/web/modules/simple_sitemap/src/Form/SimpleSitemapEntityForm.php @@ -3,8 +3,8 @@ namespace Drupal\simple_sitemap\Form; use Drupal\Core\Entity\EntityForm; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; use Drupal\simple_sitemap\Entity\SimpleSitemapType; diff --git a/web/modules/simple_sitemap/src/Form/SimpleSitemapFormBase.php b/web/modules/simple_sitemap/src/Form/SimpleSitemapFormBase.php index 113b2beec567a68171ef7114ee7503800919ddc1..82143553ee14c98b022b69479a167d628ad23927 100644 --- a/web/modules/simple_sitemap/src/Form/SimpleSitemapFormBase.php +++ b/web/modules/simple_sitemap/src/Form/SimpleSitemapFormBase.php @@ -3,11 +3,12 @@ namespace Drupal\simple_sitemap\Form; use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\simple_sitemap\Settings; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Form\ConfigFormBase; +use Drupal\Core\Form\FormStateInterface; use Drupal\simple_sitemap\Manager\Generator; +use Drupal\simple_sitemap\Settings; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Base class for Simple XML Sitemap forms. @@ -40,6 +41,8 @@ abstract class SimpleSitemapFormBase extends ConfigFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager + * The typed config manager. * @param \Drupal\simple_sitemap\Manager\Generator $generator * The sitemap generator service. * @param \Drupal\simple_sitemap\Settings $settings @@ -49,15 +52,16 @@ abstract class SimpleSitemapFormBase extends ConfigFormBase { */ public function __construct( ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typedConfigManager, Generator $generator, Settings $settings, - FormHelper $form_helper + FormHelper $form_helper, ) { $this->generator = $generator; $this->settings = $settings; $this->formHelper = $form_helper; - parent::__construct($config_factory); + parent::__construct($config_factory, $typedConfigManager); } /** @@ -66,6 +70,7 @@ public function __construct( public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('simple_sitemap.generator'), $container->get('simple_sitemap.settings'), $container->get('simple_sitemap.form_helper') diff --git a/web/modules/simple_sitemap/src/Form/SimpleSitemapTypeEntityForm.php b/web/modules/simple_sitemap/src/Form/SimpleSitemapTypeEntityForm.php index e35004dbd7e0bff0c70e37a8f7f4d3c6d9479819..aa9ff2779a188b20ee87cbb003b3600179f599b9 100644 --- a/web/modules/simple_sitemap/src/Form/SimpleSitemapTypeEntityForm.php +++ b/web/modules/simple_sitemap/src/Form/SimpleSitemapTypeEntityForm.php @@ -3,8 +3,8 @@ namespace Drupal\simple_sitemap\Form; use Drupal\Core\Entity\EntityForm; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\SitemapGeneratorManager; use Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorManager; diff --git a/web/modules/simple_sitemap/src/Form/StatusForm.php b/web/modules/simple_sitemap/src/Form/StatusForm.php index 53312950e4cdbfed890274e296bdaf4df7039b2c..586b8717691ef5ad4816e02bad42ecdecb2f038a 100644 --- a/web/modules/simple_sitemap/src/Form/StatusForm.php +++ b/web/modules/simple_sitemap/src/Form/StatusForm.php @@ -3,14 +3,15 @@ namespace Drupal\simple_sitemap\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; +use Drupal\Core\Database\Connection; use Drupal\Core\Datetime\DateFormatter; +use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\RendererInterface; +use Drupal\simple_sitemap\Manager\Generator as SimplesitemapOld; use Drupal\simple_sitemap\Queue\QueueWorker; use Drupal\simple_sitemap\Settings; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Form\FormStateInterface; -use Drupal\simple_sitemap\Manager\Generator as SimplesitemapOld; -use Drupal\Core\Database\Connection; /** * Provides form to manage sitemap status. @@ -50,6 +51,8 @@ class StatusForm extends SimpleSitemapFormBase { * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager + * The typed config manager. * @param \Drupal\simple_sitemap\Manager\Generator $generator * The sitemap generator service. * @param \Drupal\simple_sitemap\Settings $settings @@ -67,16 +70,18 @@ class StatusForm extends SimpleSitemapFormBase { */ public function __construct( ConfigFactoryInterface $config_factory, + TypedConfigManagerInterface $typedConfigManager, SimplesitemapOld $generator, Settings $settings, FormHelper $form_helper, Connection $database, DateFormatter $date_formatter, QueueWorker $queue_worker, - RendererInterface $renderer + RendererInterface $renderer, ) { parent::__construct( $config_factory, + $typedConfigManager, $generator, $settings, $form_helper @@ -93,6 +98,7 @@ public function __construct( public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('simple_sitemap.generator'), $container->get('simple_sitemap.settings'), $container->get('simple_sitemap.form_helper'), diff --git a/web/modules/simple_sitemap/src/Logger.php b/web/modules/simple_sitemap/src/Logger.php index d441ec9a1392f2e6ea89d9e075825fabb4713cfd..3f2f076a240ef6928770efa78699f82e85d342d7 100644 --- a/web/modules/simple_sitemap/src/Logger.php +++ b/web/modules/simple_sitemap/src/Logger.php @@ -3,8 +3,8 @@ namespace Drupal\simple_sitemap; use Drupal\Core\Messenger\MessengerInterface; -use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Session\AccountProxyInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; use Psr\Log\LoggerInterface; /** @@ -72,7 +72,7 @@ class Logger { public function __construct( LoggerInterface $logger, MessengerInterface $messenger, - AccountProxyInterface $current_user + AccountProxyInterface $current_user, ) { $this->logger = $logger; $this->messenger = $messenger; diff --git a/web/modules/simple_sitemap/src/Manager/CustomLinkManager.php b/web/modules/simple_sitemap/src/Manager/CustomLinkManager.php index 6d79eb9d97c674f210687b268ed7c5e93fda17da..e8b67d034a34326a5c5db21d58078072c5702ac0 100644 --- a/web/modules/simple_sitemap/src/Manager/CustomLinkManager.php +++ b/web/modules/simple_sitemap/src/Manager/CustomLinkManager.php @@ -2,8 +2,8 @@ namespace Drupal\simple_sitemap\Manager; -use Drupal\Core\Path\PathValidatorInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Path\PathValidatorInterface; use Drupal\simple_sitemap\Entity\SimpleSitemap; /** @@ -48,7 +48,7 @@ class CustomLinkManager implements SitemapGetterInterface { */ public function __construct( ConfigFactoryInterface $config_factory, - PathValidatorInterface $path_validator + PathValidatorInterface $path_validator, ) { $this->configFactory = $config_factory; $this->pathValidator = $path_validator; diff --git a/web/modules/simple_sitemap/src/Manager/EntityManager.php b/web/modules/simple_sitemap/src/Manager/EntityManager.php index a4d230fdb1d63961367c2f89d41738be8dea06b8..0c7807a684f32d5bb2ded9dd6fdb1e1d9141169e 100644 --- a/web/modules/simple_sitemap/src/Manager/EntityManager.php +++ b/web/modules/simple_sitemap/src/Manager/EntityManager.php @@ -95,7 +95,7 @@ public function __construct( ConfigFactoryInterface $config_factory, Connection $database, EntityTypeManagerInterface $entity_type_manager, - EntityFieldManagerInterface $entity_field_manager + EntityFieldManagerInterface $entity_field_manager, ) { $this->entityHelper = $entity_helper; $this->settings = $settings; diff --git a/web/modules/simple_sitemap/src/Manager/Generator.php b/web/modules/simple_sitemap/src/Manager/Generator.php index 8f51470d39e07ce224a53775effc0149a8d1dad4..d67a7a2e9d2cb803e16270a55366c28ea285647c 100644 --- a/web/modules/simple_sitemap/src/Manager/Generator.php +++ b/web/modules/simple_sitemap/src/Manager/Generator.php @@ -64,7 +64,7 @@ public function __construct( Settings $settings, QueueWorker $queue_worker, LockBackendInterface $lock = NULL, - Logger $logger = NULL + Logger $logger = NULL, ) { $this->settings = $settings; $this->queueWorker = $queue_worker; diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorBase.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorBase.php index cc84efb0f02f2ae576df0f972eb6b7597020bdd9..6e2ab0656513d3f16ee4d0a814d0d9e5d8b83c2d 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorBase.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorBase.php @@ -3,11 +3,11 @@ namespace Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator; use Drupal\Core\Extension\ModuleExtensionList; -use Drupal\simple_sitemap\Plugin\simple_sitemap\SimpleSitemapPluginBase; +use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\simple_sitemap\Entity\SimpleSitemapInterface; +use Drupal\simple_sitemap\Plugin\simple_sitemap\SimpleSitemapPluginBase; use Drupal\simple_sitemap\Settings; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Extension\ModuleHandlerInterface; /** * Provides a base class for SitemapGenerator plugins. @@ -85,7 +85,7 @@ public function __construct( ModuleHandlerInterface $module_handler, SitemapWriter $sitemap_writer, Settings $settings, - ModuleExtensionList $module_list + ModuleExtensionList $module_list, ) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->moduleHandler = $module_handler; diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorManager.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorManager.php index a42080c4c03cb828852d0666f932d7adab2168b0..c3bfed71dc9d5327d2df2beac4be4d6e6aa1d767 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorManager.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/SitemapGenerator/SitemapGeneratorManager.php @@ -2,9 +2,9 @@ namespace Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator; -use Drupal\Core\Plugin\DefaultPluginManager; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Plugin\DefaultPluginManager; use Drupal\simple_sitemap\Annotation\SitemapGenerator; /** @@ -26,7 +26,7 @@ class SitemapGeneratorManager extends DefaultPluginManager { public function __construct( \Traversable $namespaces, CacheBackendInterface $cache_backend, - ModuleHandlerInterface $module_handler + ModuleHandlerInterface $module_handler, ) { parent::__construct( 'Plugin/simple_sitemap/SitemapGenerator', diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/ArbitraryUrlGenerator.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/ArbitraryUrlGenerator.php index 5643bb29be7adb5d495a9fff93db0d615713a05d..d25d2e81b68a2d32f7fd5470763603b6043312d4 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/ArbitraryUrlGenerator.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/ArbitraryUrlGenerator.php @@ -48,7 +48,7 @@ public function __construct( $plugin_definition, Logger $logger, Settings $settings, - ModuleHandlerInterface $module_handler + ModuleHandlerInterface $module_handler, ) { parent::__construct( $configuration, @@ -67,7 +67,8 @@ public static function create( ContainerInterface $container, array $configuration, $plugin_id, - $plugin_definition): SimpleSitemapPluginBase { + $plugin_definition, + ): SimpleSitemapPluginBase { return new static( $configuration, diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/CustomUrlGenerator.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/CustomUrlGenerator.php index 4b99af13696e398702d486e5b32967e56ded9219..20171de4bdb217699117b827116dbe9ff0142385 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/CustomUrlGenerator.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/CustomUrlGenerator.php @@ -2,17 +2,17 @@ namespace Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator; +use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Language\LanguageManagerInterface; +use Drupal\Core\Path\PathValidatorInterface; use Drupal\Core\Url; -use Drupal\Component\Utility\UrlHelper; use Drupal\simple_sitemap\Entity\EntityHelper; use Drupal\simple_sitemap\Exception\SkipElementException; use Drupal\simple_sitemap\Logger; use Drupal\simple_sitemap\Manager\CustomLinkManager; use Drupal\simple_sitemap\Plugin\simple_sitemap\SimpleSitemapPluginBase; -use Drupal\Core\Language\LanguageManagerInterface; -use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Path\PathValidatorInterface; use Drupal\simple_sitemap\Settings; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -84,7 +84,8 @@ public function __construct( EntityTypeManagerInterface $entity_type_manager, EntityHelper $entity_helper, CustomLinkManager $custom_links, - PathValidatorInterface $path_validator) { + PathValidatorInterface $path_validator, + ) { parent::__construct( $configuration, $plugin_id, @@ -106,7 +107,8 @@ public static function create( ContainerInterface $container, array $configuration, $plugin_id, - $plugin_definition): SimpleSitemapPluginBase { + $plugin_definition, + ): SimpleSitemapPluginBase { return new static( $configuration, $plugin_id, diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php index 18ff04a0300211118d5703f007a9da529769a6c8..06b2474186d4599e9841a33b27d8729e5fbabd13 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php @@ -89,7 +89,7 @@ public function __construct( EntityHelper $entity_helper, EntityManager $entities_manager, MenuLinkTreeInterface $menu_link_tree, - MenuLinkManagerInterface $menu_link_manager + MenuLinkManagerInterface $menu_link_manager, ) { parent::__construct( $configuration, @@ -113,7 +113,8 @@ public static function create( ContainerInterface $container, array $configuration, $plugin_id, - $plugin_definition): SimpleSitemapPluginBase { + $plugin_definition, + ): SimpleSitemapPluginBase { return new static( $configuration, $plugin_id, diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGenerator.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGenerator.php index 91a255b927856f38a81aef18c33a738681d35868..2e53e5bfea26d136e1384dfb57650d6dbf173874 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGenerator.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGenerator.php @@ -2,16 +2,16 @@ namespace Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator; +use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface; use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Url; -use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface; use Drupal\simple_sitemap\Entity\EntityHelper; use Drupal\simple_sitemap\Exception\SkipElementException; use Drupal\simple_sitemap\Logger; use Drupal\simple_sitemap\Manager\EntityManager; use Drupal\simple_sitemap\Plugin\simple_sitemap\SimpleSitemapPluginBase; -use Drupal\Core\Language\LanguageManagerInterface; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\simple_sitemap\Settings; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -91,7 +91,7 @@ public function __construct( EntityHelper $entity_helper, EntityManager $entities_manager, UrlGeneratorManager $url_generator_manager, - MemoryCacheInterface $memory_cache + MemoryCacheInterface $memory_cache, ) { parent::__construct( $configuration, @@ -116,7 +116,8 @@ public static function create( ContainerInterface $container, array $configuration, $plugin_id, - $plugin_definition): SimpleSitemapPluginBase { + $plugin_definition, + ): SimpleSitemapPluginBase { return new static( $configuration, $plugin_id, diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php index c163c9f7a025b0894e08702235116ef187bafb16..59733c17c7554ebd94f799487a5b2a11d0d7b13f 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php @@ -87,7 +87,7 @@ public function __construct( Settings $settings, LanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager, - EntityHelper $entity_helper + EntityHelper $entity_helper, ) { parent::__construct($configuration, $plugin_id, $plugin_definition, $logger, $settings); $this->languages = $language_manager->getLanguages(); diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php index df724e2a5ba11bfde30a076d9847d51d19e35077..51c5268b4e374f52b8ad545019c71f04b9e13bc6 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php @@ -2,12 +2,12 @@ namespace Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator; +use Drupal\simple_sitemap\Entity\SimpleSitemapInterface; use Drupal\simple_sitemap\Exception\SkipElementException; +use Drupal\simple_sitemap\Logger; use Drupal\simple_sitemap\Plugin\simple_sitemap\SimpleSitemapPluginBase; -use Drupal\simple_sitemap\Entity\SimpleSitemapInterface; use Drupal\simple_sitemap\Settings; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\simple_sitemap\Logger; /** * Provides a base class for UrlGenerator plugins. @@ -54,7 +54,7 @@ public function __construct( $plugin_id, $plugin_definition, Logger $logger, - Settings $settings + Settings $settings, ) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->logger = $logger; diff --git a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorManager.php b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorManager.php index 527d8b1e3db44f47d2a7c7c964ce4364cad908b2..60aa4aac56ac7de54137280c7828e079dbb6e38a 100644 --- a/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorManager.php +++ b/web/modules/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorManager.php @@ -2,9 +2,9 @@ namespace Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator; -use Drupal\Core\Plugin\DefaultPluginManager; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Plugin\DefaultPluginManager; use Drupal\simple_sitemap\Annotation\UrlGenerator; /** @@ -26,7 +26,7 @@ class UrlGeneratorManager extends DefaultPluginManager { public function __construct( \Traversable $namespaces, CacheBackendInterface $cache_backend, - ModuleHandlerInterface $module_handler + ModuleHandlerInterface $module_handler, ) { parent::__construct( 'Plugin/simple_sitemap/UrlGenerator', diff --git a/web/modules/simple_sitemap/src/Queue/QueueWorker.php b/web/modules/simple_sitemap/src/Queue/QueueWorker.php index 534f21065504e9b9e6802ece38bcde4ac7724172..8c248dc9ca29aac59e7ddf366e273cfc0f61a36d 100644 --- a/web/modules/simple_sitemap/src/Queue/QueueWorker.php +++ b/web/modules/simple_sitemap/src/Queue/QueueWorker.php @@ -7,6 +7,8 @@ use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\Lock\LockBackendInterface; +use Drupal\Core\Logger\LoggerChannelTrait; +use Drupal\Core\Utility\Error; use Drupal\simple_sitemap\Entity\SimpleSitemap; use Drupal\simple_sitemap\Logger; use Drupal\simple_sitemap\Settings; @@ -17,6 +19,7 @@ class QueueWorker { use BatchTrait; + use LoggerChannelTrait; protected const REBUILD_QUEUE_CHUNK_ITEM_SIZE = 5000; public const LOCK_ID = 'simple_sitemap:generation'; @@ -150,13 +153,15 @@ class QueueWorker { * @param \Drupal\Core\Lock\LockBackendInterface $lock * The lock backend that should be used. */ - public function __construct(Settings $settings, - KeyValueFactoryInterface $key_value, - SimpleSitemapQueue $element_queue, - Logger $logger, - ModuleHandlerInterface $module_handler, - EntityTypeManagerInterface $entity_type_manager, - LockBackendInterface $lock) { + public function __construct( + Settings $settings, + KeyValueFactoryInterface $key_value, + SimpleSitemapQueue $element_queue, + Logger $logger, + ModuleHandlerInterface $module_handler, + EntityTypeManagerInterface $entity_type_manager, + LockBackendInterface $lock, + ) { $this->settings = $settings; $this->store = $key_value->get('simple_sitemap'); $this->queue = $element_queue; @@ -323,7 +328,8 @@ public function generate(string $from = self::GENERATE_TYPE_FORM): QueueWorker { } } catch (\Exception $e) { - watchdog_exception('simple_sitemap', $e); + $logger = $this->getLogger('simple_sitemap'); + Error::logException($logger, $e); } // @todo May want to use deleteItems() instead. diff --git a/web/modules/simple_sitemap/tests/scripts/performance_test.php b/web/modules/simple_sitemap/tests/scripts/performance_test.php index 23200ed7f2265c84cc3e81949cce17cb7768a42f..f8bed5d9d12eccfc8b484ea75b28793160691472 100644 --- a/web/modules/simple_sitemap/tests/scripts/performance_test.php +++ b/web/modules/simple_sitemap/tests/scripts/performance_test.php @@ -5,6 +5,7 @@ use Drupal\Component\Utility\Timer; use Drupal\Core\Batch\BatchBuilder; use Drupal\Core\Database\Database; +use Drupal\Core\StringTranslation\ByteSizeMarkup; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\Tests\RandomGeneratorTrait; @@ -133,8 +134,8 @@ public static function doBatchGenerate($count_queries = FALSE, &$context) { $context['message'] = "Query count: " . count($query_logger->get('simple_sitemap')); } else { - $peak_mem = format_size(memory_get_peak_usage(TRUE)); - $mem = format_size(memory_get_usage(TRUE)); + $peak_mem = ByteSizeMarkup::create(memory_get_peak_usage(TRUE)); + $mem = ByteSizeMarkup::create(memory_get_usage(TRUE)); $context['message'] = "Memory: $peak_mem, non-peak mem: $mem"; } } diff --git a/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTest.php b/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTest.php index 7e29abec3fccb2db3b269a38dc1f286b057dae6f..d995c630e2a1331df5f62d2f59ce9d0338210a6c 100644 --- a/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTest.php +++ b/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTest.php @@ -682,7 +682,7 @@ public function testSitemapVariants() { /** * Test cases for ::testGenerationResume. */ - public function generationResumeProvider() { + public static function generationResumeProvider() { return [ [1000, 500, 1], [1000, 500, 3, ['de']], diff --git a/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTestBase.php b/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTestBase.php index cb6b19217b766cf01467986d991d20dc9e804670..cda2ca6cd8bb6da1fbe92a567ca2c90c790a9332 100644 --- a/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTestBase.php +++ b/web/modules/simple_sitemap/tests/src/Functional/SimplesitemapTestBase.php @@ -3,8 +3,8 @@ namespace Drupal\Tests\simple_sitemap\Functional; use Drupal\Core\StringTranslation\StringTranslationTrait; -use Drupal\Tests\BrowserTestBase; use Drupal\language\Entity\ConfigurableLanguage; +use Drupal\Tests\BrowserTestBase; /** * Provides the base class for web tests for Simple sitemap. diff --git a/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.css b/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.css index 5f9975ec73ca153f8d51ef30e5f98096c1905cb4..c38ebc07e003836fdc697c1116a302ffa4312289 100644 --- a/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.css +++ b/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.css @@ -52,13 +52,14 @@ table.sitemap thead tr .tablesorter-headerDesc { table.sitemap thead tr .tablesorter-headerAsc .tablesorter-header-inner::after { position: absolute; right: 0; - content: '\25b2'; + content: "\25b2"; } +/* stylelint-disable-next-line prettier/prettier */ table.sitemap thead tr .tablesorter-headerDesc .tablesorter-header-inner::after { position: absolute; right: 0; - content: '\25bc'; + content: "\25bc"; } table.sitemap tbody tr ul { diff --git a/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.js b/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.js index 7acb97400ff14ea0169fcc0eb54d7fe1483f6114..5cccf4c87b33e5db6c63256cd3038723a2298969 100644 --- a/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.js +++ b/web/modules/simple_sitemap/xsl/simple_sitemap.xsl.js @@ -37,11 +37,11 @@ type: 'numeric', }); - $(document).ready(() => { + document.addEventListener('DOMContentLoaded', () => { // Set some location variables. - const $h1 = $('h1'); - $h1.text(`${$h1.text()}: ${window.location}`); - document.title = $h1.text(); + const h1 = document.querySelector('h1'); + h1.textContent = `${h1.textContent}: ${window.location}`; + document.title = h1.textContent; const $table = $('table'); const options = { widgets: ['zebra'] };