Quantcast
Viewing all articles
Browse latest Browse all 295198

[policy no patch] Make it possible to mark plugins as deprecated

Problem/Motivation

In #2916740: Add generic entity actions we want to mark some node and comment action plugins as deprecated and replace them with generic entity actions. Since #2870194: Ensure that process-isolated tests can use Symfony's PHPunit bridge to catch usages of deprecated code landed, it's no longer possible to mark the complete action plugin class as deprecated, because during tests, the plugin discovery will still call this class and trigger the deprecation error.

For example the NodeActionsConfigurationTest test opens up the UI and as part of that the deprecated plugin will be initialized.

So we need an other solution to mark plugins as deprecated.

Proposed resolution

I discussed this shortly with berdir and alexpott on IRC and a first proposal is to add a "deprecated" key into the plugin annotation and call trigger_error during Drupal\Component\Plugin\PluginManagerBase::createInstance()

Remaining tasks

Discuss
Implement
Review
Commit
Update https://www.drupal.org/core/deprecation

User interface changes

None

API changes

None

Data model changes

None


Viewing all articles
Browse latest Browse all 295198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>