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.

Comments

Gábor Hojtsy created an issue. See original summary.

gábor hojtsy’s picture

Status: Active » Needs review
StatusFileSize
new600 bytes

Redeprecating this would take removing all its uses, which looks like will be a possibility in Drupal 9.1, but not realistic now.

tim.plunkett’s picture

It'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?

gábor hojtsy’s picture

StatusFileSize
new737 bytes
new601 bytes

Good point.

gábor hojtsy’s picture

StatusFileSize
new730 bytes

Blergh whitespace...

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 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.

  • alexpott committed c60d74b on 9.0.x
    Issue #3116553 by Gábor Hojtsy, tim.plunkett: Undeprecate Core/Field/...

  • alexpott committed 999b1bb on 8.9.x
    Issue #3116553 by Gábor Hojtsy, tim.plunkett: Undeprecate Core/Field/...

  • alexpott committed d6f71d9 on 8.8.x
    Issue #3116553 by Gábor Hojtsy, tim.plunkett: Undeprecate Core/Field/...

Status: Fixed » Closed (fixed)

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