From f5bcc9ef2f78f4b3bfda17c862726efd7e74834f Mon Sep 17 00:00:00 2001 From: Michael Lee <lee.5151@osu.edu> Date: Mon, 26 Aug 2024 09:54:23 -0400 Subject: [PATCH] Upgrading drupal/simple_sitemap (4.1.9 => 4.2.1) --- composer.json | 2 +- composer.lock | 20 ++-- vendor/composer/installed.json | 20 ++-- vendor/composer/installed.php | 10 +- web/modules/simple_sitemap/.gitlab-ci.yml | 2 +- .../js/simple_sitemap.sitemapEntities.js | 69 ++++++------ web/modules/simple_sitemap/logo.png | 69 ++++++++++++ .../simple_sitemap_engines.info.yml | 8 +- .../src/Controller/IndexNowController.php | 2 +- .../src/Form/FormHelper.php | 8 +- .../Form/Handler/EntityFormHandlerBase.php | 6 +- .../src/Form/SimplesitemapEnginesForm.php | 19 ++-- .../PathProcessor/IndexNowPathProcessor.php | 2 +- .../QueueWorker/SitemapSubmittingWorker.php | 10 +- .../src/SearchEngineListBuilder.php | 12 ++- .../src/Submitter/SubmitterBase.php | 19 ++-- .../js/simple_sitemap.viewsUi.js | 102 ++++++++++-------- .../simple_sitemap_views.info.yml | 8 +- .../simple_sitemap_views.libraries.yml | 1 - .../SimpleSitemapViewsController.php | 4 +- .../src/EventSubscriber/ArgumentCollector.php | 10 +- .../Plugin/QueueWorker/GarbageCollector.php | 8 +- .../UrlGenerator/ViewsUrlGenerator.php | 20 ++-- .../SimpleSitemapDisplayExtender.php | 12 +-- .../src/SimpleSitemapViews.php | 2 +- ...ws.view.simple_sitemap_views_test_view.yml | 8 +- .../simple_sitemap_views_test.info.yml | 6 +- .../Functional/SimpleSitemapViewsTestBase.php | 2 +- web/modules/simple_sitemap/phpcs.xml.dist | 5 +- .../simple_sitemap/phpstan-baseline.neon | 18 ---- .../simple_sitemap/simple_sitemap.info.yml | 8 +- .../simple_sitemap.libraries.yml | 2 +- .../simple_sitemap/simple_sitemap.module | 4 +- .../simple_sitemap.post_update.php | 9 ++ .../src/Commands/SimpleSitemapCommands.php | 2 +- .../src/Entity/SimpleSitemapStorage.php | 4 +- .../src/Entity/SimpleSitemapTypeStorage.php | 4 +- .../src/Form/CustomLinksForm.php | 8 +- .../simple_sitemap/src/Form/EntitiesForm.php | 14 ++- .../src/Form/EntityBundlesForm.php | 16 ++- .../simple_sitemap/src/Form/FormHelper.php | 8 +- .../Handler/EntityFormHandlerInterface.php | 2 +- .../simple_sitemap/src/Form/SettingsForm.php | 16 ++- .../src/Form/SimpleSitemapEntityForm.php | 2 +- .../src/Form/SimpleSitemapFormBase.php | 15 ++- .../src/Form/SimpleSitemapTypeEntityForm.php | 2 +- .../simple_sitemap/src/Form/StatusForm.php | 14 ++- web/modules/simple_sitemap/src/Logger.php | 4 +- .../src/Manager/CustomLinkManager.php | 4 +- .../src/Manager/EntityManager.php | 2 +- .../simple_sitemap/src/Manager/Generator.php | 2 +- .../SitemapGenerator/SitemapGeneratorBase.php | 6 +- .../SitemapGeneratorManager.php | 4 +- .../UrlGenerator/ArbitraryUrlGenerator.php | 5 +- .../UrlGenerator/CustomUrlGenerator.php | 14 +-- .../EntityMenuLinkContentUrlGenerator.php | 5 +- .../UrlGenerator/EntityUrlGenerator.php | 11 +- .../UrlGenerator/EntityUrlGeneratorBase.php | 2 +- .../UrlGenerator/UrlGeneratorBase.php | 6 +- .../UrlGenerator/UrlGeneratorManager.php | 4 +- .../simple_sitemap/src/Queue/QueueWorker.php | 22 ++-- .../tests/scripts/performance_test.php | 5 +- .../src/Functional/SimplesitemapTest.php | 2 +- .../src/Functional/SimplesitemapTestBase.php | 2 +- .../simple_sitemap/xsl/simple_sitemap.xsl.css | 5 +- .../simple_sitemap/xsl/simple_sitemap.xsl.js | 8 +- 66 files changed, 428 insertions(+), 299 deletions(-) create mode 100644 web/modules/simple_sitemap/logo.png diff --git a/composer.json b/composer.json index 7ff8afcbaa..7211e1fc6b 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 c797facfda..ebabc82c25 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 bd1439c102..0533e49459 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 848d67372c..2c9a2a3fc5 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 99858a714a..da8c676c06 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 f1e5fd026a..92489eda2d 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 0000000000..4a15f6a8ab --- /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 0ee9d23d2c..74bb2d29e4 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 3856bddced..5a68510e71 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 f062619998..b831631e20 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 6b72f2a029..a24c4c1fa4 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 c1a82c7934..112dc92ca5 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 a9e06e4839..507aa04e12 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 a480722493..4cc3f6ff2d 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 21c1f0aa1c..2f28708b59 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 b32228bf55..65b54cb058 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 3054f613fa..d8ae5d99ef 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 6183d2cd89..66fdd67508 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 8b042f2d07..3d734e6877 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 97259db4e3..64a8340950 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 6e92145884..e45617d6fb 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 d8b864e9ff..1c56da7c6d 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 46fc1608d6..ceb7db8d0c 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 586e226c83..c34fa3809f 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 de0494334d..0f8e097551 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 6c28a2d45b..d6d8aecebc 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 33c599b99c..1623e50b74 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 c29cabf0ba..f35d054778 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 5f893ab5e5..96683117b8 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 a5f6c9287b..7cd4773c22 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 0016141753..cd544a9411 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 c3c4b9c79c..72a3acaf2e 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 203b82a162..e70bff097d 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 a258d9358b..a65e43ba8e 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 ede6b6a291..47bb5700dc 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 9fbdff9b87..dfd12b7736 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 e7683d6ff9..9ad8b8e8b2 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 fde57313cb..14d83ab699 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 acf2025484..50cbeb7656 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 7b10f13fb5..358dc548de 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 d143e88326..d004546263 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 a8465d2076..1759e25cb6 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 f3704f42e4..ab27d30d55 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 2dfa7a6662..06505ba0f6 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 113b2beec5..82143553ee 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 e35004dbd7..aa9ff2779a 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 53312950e4..586b871769 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 d441ec9a13..3f2f076a24 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 6d79eb9d97..e8b67d034a 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 a4d230fdb1..0c7807a684 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 8f51470d39..d67a7a2e9d 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 cc84efb0f0..6e2ab06565 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 a42080c4c0..c3bfed71dc 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 5643bb29be..d25d2e81b6 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 4b99af1369..20171de4bd 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 18ff04a030..06b2474186 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 91a255b927..2e53e5bfea 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 c163c9f7a0..59733c17c7 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 df724e2a5b..51c5268b4e 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 527d8b1e3d..60aa4aac56 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 534f210655..8c248dc9ca 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 23200ed7f2..f8bed5d9d1 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 7e29abec3f..d995c630e2 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 cb6b19217b..cda2ca6cd8 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 5f9975ec73..c38ebc07e0 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 7acb97400f..5cccf4c87b 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'] }; -- GitLab