From d27736f18c6cae9f0fc7703c0bcfde511cd50b5f Mon Sep 17 00:00:00 2001 From: Juan Hernandez <juandahrz@gmail.com> Date: Tue, 11 Mar 2025 12:37:31 -0500 Subject: [PATCH 1/5] Issue #3488681 by juandhr: Fix defgroup open and close that were separated during Hook conversion --- core/modules/field/field.module | 4 ---- core/modules/field/src/Hook/FieldHooks.php | 4 ++++ core/modules/node/node.module | 9 +++++++++ core/modules/system/src/Hook/SystemHooks.php | 4 ---- core/modules/system/system.module | 4 ++++ core/modules/taxonomy/src/Hook/TaxonomyHooks.php | 4 ++++ core/modules/taxonomy/taxonomy.module | 7 ++++++- 7 files changed, 27 insertions(+), 9 deletions(-) diff --git a/core/modules/field/field.module b/core/modules/field/field.module index ec84559d6b95..2e29b275a20f 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -15,10 +15,6 @@ */ require_once __DIR__ . '/field.purge.inc'; -/** - * @} End of "defgroup field". - */ - /** * Assembles a partial entity structure with initial IDs. * diff --git a/core/modules/field/src/Hook/FieldHooks.php b/core/modules/field/src/Hook/FieldHooks.php index 546a6e0c95db..7d823bf6b285 100644 --- a/core/modules/field/src/Hook/FieldHooks.php +++ b/core/modules/field/src/Hook/FieldHooks.php @@ -249,6 +249,10 @@ public function entityBundleDelete($entity_type_id, $bundle) { } } + /** + * @} End of "defgroup field". + */ + /** * Implements hook_config_import_steps_alter(). */ diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 917aa8e47f05..51a8254192e9 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -405,6 +405,11 @@ function node_form_system_themes_admin_form_submit($form, FormStateInterface $fo ->save(); } +/** + * @addtogroup node_access + * @{ + */ + /** * Fetches an array of permission IDs granted to the given user ID. * @@ -662,6 +667,10 @@ function _node_access_rebuild_batch_finished($success, $results, $operations) { } } +/** + * @} End of "addtogroup node_access". + */ + /** * Marks a node to be re-indexed by the node_search plugin. * diff --git a/core/modules/system/src/Hook/SystemHooks.php b/core/modules/system/src/Hook/SystemHooks.php index 90307fae353a..d0e7338afe25 100644 --- a/core/modules/system/src/Hook/SystemHooks.php +++ b/core/modules/system/src/Hook/SystemHooks.php @@ -153,10 +153,6 @@ public function help($route_name, RouteMatchInterface $route_match) { } } - /** - * @} End of "defgroup authorize". - */ - /** * Implements hook_updater_info(). */ diff --git a/core/modules/system/system.module b/core/modules/system/system.module index cdc25a2cc049..63ce27dabc09 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -302,6 +302,10 @@ function system_authorized_batch_process() { return batch_process($finish_url->setAbsolute()->toString(), $process_url); } +/** + * @} End of "defgroup authorize". + */ + /** * Implements hook_preprocess_HOOK() for block templates. */ diff --git a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php index 00477f824d9a..8e42fbcce7e9 100644 --- a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php +++ b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php @@ -176,4 +176,8 @@ public function taxonomyTermDelete(Term $term) { } } + /** + * @} End of "defgroup taxonomy_index". + */ + } diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index d00cf3f80502..3afebdc41144 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -89,6 +89,11 @@ function taxonomy_term_is_page(Term $term) { return FALSE; } +/** + * @addtogroup taxonomy_index + * @{ + */ + /** * Builds and inserts taxonomy index entries for a given node. * @@ -152,5 +157,5 @@ function taxonomy_delete_node_index(EntityInterface $node) { } /** - * @} End of "defgroup taxonomy_index". + * @} End of "addtogroup taxonomy_index". */ -- GitLab From d5bbfc1768f2c975488fd1ebe34dcfba388fdd7f Mon Sep 17 00:00:00 2001 From: Chris Reynolds <chris@jazzsequence.com> Date: Thu, 27 Mar 2025 11:31:38 -0400 Subject: [PATCH 2/5] empty commit to rerun tests -- GitLab From 5475aa852b545f8d73d0a8911111bef705288de4 Mon Sep 17 00:00:00 2001 From: David Cameron <david@cadeyrn.us> Date: Thu, 3 Apr 2025 18:22:26 -0500 Subject: [PATCH 3/5] phpcs --- .../taxonomy/src/Hook/TaxonomyHooks.php | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php index e3e63da6aee8..616c2239a913 100644 --- a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php +++ b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php @@ -97,28 +97,6 @@ public function localTasksAlter(&$local_tasks): void { } } - /** - * Implements hook_entity_operation(). - */ - #[Hook('entity_operation')] - public function entityOperation(EntityInterface $term): array { - $operations = []; - if ($term instanceof Term && $term->access('create')) { - $operations['add-child'] = [ - 'title' => $this->t('Add child'), - 'weight' => 10, - 'url' => Url::fromRoute('entity.taxonomy_term.add_form', [ - 'taxonomy_vocabulary' => $term->bundle(), - ], [ - 'query' => [ - 'parent' => $term->id(), - ], - ]), - ]; - } - return $operations; - } - /** * @defgroup taxonomy_index Taxonomy indexing * @{ @@ -184,4 +162,26 @@ public function taxonomyTermDelete(Term $term): void { * @} End of "defgroup taxonomy_index". */ + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $term): array { + $operations = []; + if ($term instanceof Term && $term->access('create')) { + $operations['add-child'] = [ + 'title' => $this->t('Add child'), + 'weight' => 10, + 'url' => Url::fromRoute('entity.taxonomy_term.add_form', [ + 'taxonomy_vocabulary' => $term->bundle(), + ], [ + 'query' => [ + 'parent' => $term->id(), + ], + ]), + ]; + } + return $operations; + } + } -- GitLab From 195593f0de0a6c80251997a48282bf00431dc909 Mon Sep 17 00:00:00 2001 From: David Cameron <david@cadeyrn.us> Date: Thu, 3 Apr 2025 21:46:55 -0500 Subject: [PATCH 4/5] Revert "phpcs" This reverts commit 5475aa852b545f8d73d0a8911111bef705288de4. --- .../taxonomy/src/Hook/TaxonomyHooks.php | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php index 616c2239a913..e3e63da6aee8 100644 --- a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php +++ b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php @@ -97,6 +97,28 @@ public function localTasksAlter(&$local_tasks): void { } } + /** + * Implements hook_entity_operation(). + */ + #[Hook('entity_operation')] + public function entityOperation(EntityInterface $term): array { + $operations = []; + if ($term instanceof Term && $term->access('create')) { + $operations['add-child'] = [ + 'title' => $this->t('Add child'), + 'weight' => 10, + 'url' => Url::fromRoute('entity.taxonomy_term.add_form', [ + 'taxonomy_vocabulary' => $term->bundle(), + ], [ + 'query' => [ + 'parent' => $term->id(), + ], + ]), + ]; + } + return $operations; + } + /** * @defgroup taxonomy_index Taxonomy indexing * @{ @@ -162,26 +184,4 @@ public function taxonomyTermDelete(Term $term): void { * @} End of "defgroup taxonomy_index". */ - /** - * Implements hook_entity_operation(). - */ - #[Hook('entity_operation')] - public function entityOperation(EntityInterface $term): array { - $operations = []; - if ($term instanceof Term && $term->access('create')) { - $operations['add-child'] = [ - 'title' => $this->t('Add child'), - 'weight' => 10, - 'url' => Url::fromRoute('entity.taxonomy_term.add_form', [ - 'taxonomy_vocabulary' => $term->bundle(), - ], [ - 'query' => [ - 'parent' => $term->id(), - ], - ]), - ]; - } - return $operations; - } - } -- GitLab From 42384b9a9f801087af3851491d18884bc5440337 Mon Sep 17 00:00:00 2001 From: David Cameron <david@cadeyrn.us> Date: Thu, 3 Apr 2025 21:48:50 -0500 Subject: [PATCH 5/5] phpcs:ignore --- core/modules/taxonomy/src/Hook/TaxonomyHooks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php index e3e63da6aee8..82a88ce8a198 100644 --- a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php +++ b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php @@ -180,6 +180,7 @@ public function taxonomyTermDelete(Term $term): void { } } + // phpcs:ignore Drupal.Commenting.InlineComment.DocBlock /** * @} End of "defgroup taxonomy_index". */ -- GitLab