From 0a84710682ddc9a355dac2ae5202199cb97b8314 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Thu, 7 Mar 2024 15:04:26 +0000
Subject: [PATCH] Issue #3426217 by mstrelan: Fix @param docs for $deriver on
 plugin attribute classes

---
 .../Definition/DerivablePluginDefinitionInterface.php       | 4 ++--
 core/lib/Drupal/Core/Action/Attribute/Action.php            | 2 +-
 core/lib/Drupal/Core/Archiver/Attribute/Archiver.php        | 2 +-
 core/lib/Drupal/Core/Block/Attribute/Block.php              | 2 +-
 .../Core/ImageToolkit/Attribute/ImageToolkitOperation.php   | 2 +-
 core/lib/Drupal/Core/Mail/Attribute/Mail.php                | 2 +-
 core/lib/Drupal/Core/TypedData/Attribute/DataType.php       | 2 +-
 core/lib/Drupal/Core/Validation/Attribute/Constraint.php    | 2 +-
 core/modules/help/src/Attribute/HelpSection.php             | 2 +-
 core/modules/rest/src/Attribute/RestResource.php            | 6 +++---
 10 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/core/lib/Drupal/Component/Plugin/Definition/DerivablePluginDefinitionInterface.php b/core/lib/Drupal/Component/Plugin/Definition/DerivablePluginDefinitionInterface.php
index 6aaa3adb31a3..11e26d840235 100644
--- a/core/lib/Drupal/Component/Plugin/Definition/DerivablePluginDefinitionInterface.php
+++ b/core/lib/Drupal/Component/Plugin/Definition/DerivablePluginDefinitionInterface.php
@@ -12,7 +12,7 @@ interface DerivablePluginDefinitionInterface extends PluginDefinitionInterface {
   /**
    * Gets the name of the deriver of this plugin definition, if it exists.
    *
-   * @return string|null
+   * @return class-string|null
    *   Either the deriver class name, or NULL if the plugin is not derived.
    */
   public function getDeriver();
@@ -20,7 +20,7 @@ public function getDeriver();
   /**
    * Sets the deriver of this plugin definition.
    *
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   Either the name of a class that implements
    *   \Drupal\Component\Plugin\Derivative\DeriverInterface, or NULL.
    *
diff --git a/core/lib/Drupal/Core/Action/Attribute/Action.php b/core/lib/Drupal/Core/Action/Attribute/Action.php
index e36fdc521c27..42e3c2e59e33 100644
--- a/core/lib/Drupal/Core/Action/Attribute/Action.php
+++ b/core/lib/Drupal/Core/Action/Attribute/Action.php
@@ -31,7 +31,7 @@ class Action extends Plugin {
    * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $category
    *   (optional) The category under which the action should be listed in the
    *   UI.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class.
    * @param string|null $confirm_form_route_name
    *   (optional) The route name for a confirmation form for this action.
diff --git a/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php b/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php
index 438ba18f8319..07884ad9b37a 100644
--- a/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php
+++ b/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php
@@ -31,7 +31,7 @@ class Archiver extends Plugin {
    *   The description of the archiver plugin.
    * @param array $extensions
    *   An array of valid extensions for this archiver.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class.
    */
   public function __construct(
diff --git a/core/lib/Drupal/Core/Block/Attribute/Block.php b/core/lib/Drupal/Core/Block/Attribute/Block.php
index 275e399395a8..46d5ccc5ca41 100644
--- a/core/lib/Drupal/Core/Block/Attribute/Block.php
+++ b/core/lib/Drupal/Core/Block/Attribute/Block.php
@@ -23,7 +23,7 @@ class Block extends Plugin {
    * @param \Drupal\Core\Plugin\Context\ContextDefinitionInterface[] $context_definitions
    *   (optional) An array of context definitions describing the context used by
    *   the plugin. The array is keyed by context names.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class.
    * @param string[] $forms
    *   (optional) An array of form class names keyed by a string.
diff --git a/core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkitOperation.php b/core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkitOperation.php
index fb7abcaa3344..2b481287a972 100644
--- a/core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkitOperation.php
+++ b/core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkitOperation.php
@@ -56,7 +56,7 @@ class ImageToolkitOperation extends Plugin {
    *   The human-readable name of the image toolkit operation.
    * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
    *   (optional) The description of the image toolkit operation.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class for the image toolkit operation.
    */
   public function __construct(
diff --git a/core/lib/Drupal/Core/Mail/Attribute/Mail.php b/core/lib/Drupal/Core/Mail/Attribute/Mail.php
index f0d2d1ee4c97..c533f7374def 100644
--- a/core/lib/Drupal/Core/Mail/Attribute/Mail.php
+++ b/core/lib/Drupal/Core/Mail/Attribute/Mail.php
@@ -30,7 +30,7 @@ class Mail extends Plugin {
    *   The label of the plugin.
    * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
    *   (optional) A description of the plugin.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class.
    */
   public function __construct(
diff --git a/core/lib/Drupal/Core/TypedData/Attribute/DataType.php b/core/lib/Drupal/Core/TypedData/Attribute/DataType.php
index 6a5390a090c2..7413e51a1e08 100644
--- a/core/lib/Drupal/Core/TypedData/Attribute/DataType.php
+++ b/core/lib/Drupal/Core/TypedData/Attribute/DataType.php
@@ -59,7 +59,7 @@ class DataType extends Plugin {
    *   (optional) An array of validation constraints for this type.
    * @param bool $unwrap_for_canonical_representation
    *   Whether the typed object wraps the canonical representation of the data.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class for the data type.
    *
    * @see \Drupal\Core\TypedData\TypedDataManager::getConstraints()
diff --git a/core/lib/Drupal/Core/Validation/Attribute/Constraint.php b/core/lib/Drupal/Core/Validation/Attribute/Constraint.php
index ac36ef4886f0..79a108d18f67 100644
--- a/core/lib/Drupal/Core/Validation/Attribute/Constraint.php
+++ b/core/lib/Drupal/Core/Validation/Attribute/Constraint.php
@@ -34,7 +34,7 @@ class Constraint extends Plugin {
    *   multiple type names. For supporting all types, FALSE may be specified.
    *   The key defaults to an empty array, which indicates no types are
    *   supported.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class.
    */
   public function __construct(
diff --git a/core/modules/help/src/Attribute/HelpSection.php b/core/modules/help/src/Attribute/HelpSection.php
index 17564b7df0e1..fd3114a88b50 100644
--- a/core/modules/help/src/Attribute/HelpSection.php
+++ b/core/modules/help/src/Attribute/HelpSection.php
@@ -40,7 +40,7 @@ class HelpSection extends Plugin {
    *   page itself.
    * @param int|null $weight
    *   (optional) The weight of the help page section.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
    *   (optional) The deriver class.
    *
    *   The sections will be ordered by this weight on the help page.
diff --git a/core/modules/rest/src/Attribute/RestResource.php b/core/modules/rest/src/Attribute/RestResource.php
index 90722cc42808..9cd01d493278 100644
--- a/core/modules/rest/src/Attribute/RestResource.php
+++ b/core/modules/rest/src/Attribute/RestResource.php
@@ -33,12 +33,12 @@ class RestResource extends Plugin {
    *   The human-readable name of the REST resource plugin.
    * @param string|null $serialization_class
    *   (optional) The serialization class to deserialize serialized data into.
-   * @param string|null $deriver
+   * @param class-string|null $deriver
+   *   (optional) The deriver class for the rest resource.
+   * @param array $uri_paths
    *   (optional) The URI paths that this REST resource plugin provides.
    *   - key: The link relation type plugin ID.
    *   - value: The URL template.
-   * @param array $uri_paths
-   *   (optional) The deriver class for the rest resource.
    *
    * @see \Symfony\Component\Serializer\SerializerInterface
    * @see core/core.link_relation_types.yml
-- 
GitLab