Problem/Motivation
From @longwave in #2716163-42: [META] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 9 branch.
PluginSettingsInterface looks really tricky because it is still used and extended heavily; PluginSettingsBase is the base of all Field API plugins and they still use the methods it provides.
core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php 6:use Drupal\Core\Field\PluginSettingsInterface; 119: protected function thirdPartySettingsForm(PluginSettingsInterface $plugin, FieldDefinitionInterface $field_definition, array $form, FormStateInterface $form_state) { 138: protected function alterSettingsSummary(array &$summary, PluginSettingsInterface $plugin, FieldDefinitionInterface $field_definition) { core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php 6:use Drupal\Core\Field\PluginSettingsInterface; 168: protected function thirdPartySettingsForm(PluginSettingsInterface $plugin, FieldDefinitionInterface $field_definition, array $form, FormStateInterface $form_state) { 187: protected function alterSettingsSummary(array &$summary, PluginSettingsInterface $plugin, FieldDefinitionInterface $field_definition) { core/modules/field_ui/src/Form/EntityDisplayFormBase.php 14:use Drupal\Core\Field\PluginSettingsInterface; 895: * @param \Drupal\Core\Field\PluginSettingsInterface $plugin 907: abstract protected function thirdPartySettingsForm(PluginSettingsInterface $plugin, FieldDefinitionInterface $field_definition, array $form, FormStateInterface $form_state); 914: * @param \Drupal\Core\Field\PluginSettingsInterface $plugin 919: abstract protected function alterSettingsSummary(array &$summary, PluginSettingsInterface $plugin, FieldDefinitionInterface $field_definition); core/lib/Drupal/Core/Field/FormatterInterface.php 12:interface FormatterInterface extends PluginSettingsInterface { core/lib/Drupal/Core/Field/WidgetBaseInterface.php 16:interface WidgetBaseInterface extends PluginSettingsInterface { core/lib/Drupal/Core/Field/PluginSettingsBase.php 13:abstract class PluginSettingsBase extends PluginBase implements PluginSettingsInterface, DependentPluginInterface { core/lib/Drupal/Core/Field/PluginSettingsInterface.php 14:interface PluginSettingsInterface extends PluginInspectionInterface, ThirdPartySettingsInterface { core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php 84: * @return \Drupal\Core\Field\PluginSettingsInterface|null
Proposed resolution
Apparently best to undeprecate it. Looks like this was a wishful deprecation.
Remaining tasks
Do it.
User interface changes
None.
API changes
Core/Field/PluginSettingsInterface becomes undeprecated.
Data model changes
None.
Release notes snippet
N/A.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3116553-5.patch | 730 bytes | gábor hojtsy |
| #4 | interdiff.txt | 601 bytes | gábor hojtsy |
| #4 | 3116553-4.patch | 737 bytes | gábor hojtsy |
| #2 | 3116553.patch | 600 bytes | gábor hojtsy |
Comments
Comment #2
gábor hojtsyRedeprecating this would take removing all its uses, which looks like will be a possibility in Drupal 9.1, but not realistic now.
Comment #3
tim.plunkettIt'd be nice to keep the intent of the message (please don't use this unless you have to).
Maybe an @todo pointing to #1764380: Merge PluginSettingsInterface into ConfigurableInterface?
Comment #4
gábor hojtsyGood point.
Comment #5
gábor hojtsyBlergh whitespace...
Comment #6
tim.plunkettThanks!
Comment #7
alexpottCommitted and pushed c60d74bdba to 9.0.x and 999b1bb160 to 8.9.x and d6f71d974b to 8.8.x. Thanks!
Backported to 8.8.x as this is a docs fix and affects drupal-check.