See #3081145: Remove BC layers in the Plugin component, we no longer need that helper now that there is only one interface left that we need to check.

We could also keep it, but then we'd have to adjust the documentation on the class.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Issue summary: View changes

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

andypost’s picture

There's 5 usages in contrib http://grep.xnddx.ru/search?text=PluginHelper%3A%3AisConfigurable

So needs follow-ups to file

andypost’s picture

Status: Active » Needs review
FileSize
5.81 KB

Filed CR and here's a patch

Not sure how deprecation test should be added to component as whole class is deprecated https://www.drupal.org/about/core/policies/core-change-policies/drupal-c...

andypost’s picture

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

catch’s picture

Version: 9.5.x-dev » 10.1.x-dev
Status: Needs review » Needs work

Patch looks great but unfortunately missed the 9.2.x window and I think we need to do this in 10.1.x for removal in 11.0.0 now.

mrinalini9’s picture

Status: Needs work » Needs review
FileSize
5.78 KB
2.32 KB

Added patch for 10.1.x branch as per #10, please review it.

catch’s picture

Title: Deprecate PluginHelper::isConfigurable() for D10 » Deprecate PluginHelper::isConfigurable()
Status: Needs review » Reviewed & tested by the community

Looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2bcbc26 and pushed to 10.1.x. Thanks!

diff --git a/core/lib/Drupal/Component/Plugin/PluginHelper.php b/core/lib/Drupal/Component/Plugin/PluginHelper.php
index 5edf1cf0e7..550a091343 100644
--- a/core/lib/Drupal/Component/Plugin/PluginHelper.php
+++ b/core/lib/Drupal/Component/Plugin/PluginHelper.php
@@ -2,12 +2,12 @@
 
 namespace Drupal\Component\Plugin;
 
-@trigger_error('The ' . __NAMESPACE__ . '\PluginHelper is deprecated in drupal:10.1.x and is removed from drupal:11.0.0. Instead, use instanceof() to check for \Drupal\Component\Plugin\ConfigurableInterface. See http://drupal.org/node/3198285', E_USER_DEPRECATED);
+@trigger_error('The ' . __NAMESPACE__ . '\PluginHelper is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Instead, use instanceof() to check for \Drupal\Component\Plugin\ConfigurableInterface. See http://drupal.org/node/3198285', E_USER_DEPRECATED);
 
 /**
  * A helper class to determine if a plugin is configurable.
  *
- * @deprecated in drupal:10.1.x and is removed from drupal:11.0.0. Instead, use
+ * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Instead, use
  *   instanceof() to check for \Drupal\Component\Plugin\ConfigurableInterface.
  *
  * @see https://www.drupal.org/node/3198285
diff --git a/core/tests/Drupal/Tests/Component/Plugin/PluginHelperLegacyTest.php b/core/tests/Drupal/Tests/Component/Plugin/PluginHelperLegacyTest.php
index 6910c16c25..bed7ab2d96 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/PluginHelperLegacyTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/PluginHelperLegacyTest.php
@@ -16,7 +16,7 @@ class PluginHelperLegacyTest extends TestCase {
   use ExpectDeprecationTrait;
 
   public function testPluginHelperDeprecation(): void {
-    $this->expectDeprecation('The Drupal\Component\Plugin\PluginHelper is deprecated in drupal:10.1.x and is removed from drupal:11.0.0. Instead, use instanceof() to check for \Drupal\Component\Plugin\ConfigurableInterface. See http://drupal.org/node/3198285');
+    $this->expectDeprecation('The Drupal\Component\Plugin\PluginHelper is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Instead, use instanceof() to check for \Drupal\Component\Plugin\ConfigurableInterface. See http://drupal.org/node/3198285');
     $this->assertEquals($this instanceof ConfigurableInterface, PluginHelper::isConfigurable($this));
     $plugin = $this->createMock(ConfigurableInterface::class);
     $this->assertEquals($plugin instanceof ConfigurableInterface, PluginHelper::isConfigurable($plugin));

Fixed on commit. Deprecation notices need real versions (i.e. tags) not branches.

  • alexpott committed 2bcbc26 on 10.1.x
    Issue #3105685 by andypost, mrinalini9: Deprecate PluginHelper::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

quietone’s picture

Published the CR.