Unused property basePluginId in plugin Deriver classes

Created on 26 March 2017, about 7 years ago
Updated 30 January 2023, over 1 year ago

Problem/Motivation

Here are classes that possibly do not need this property.

  • core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationLocalTasks.php
  • core/modules/content_moderation/src/Plugin/Derivative/DynamicLocalTasks.php
  • core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php
  • core/modules/views/src/Plugin/Derivative/ViewsBlock.php
  • core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php
  • core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php
  • core/modules/node/src/Plugin/migrate/D6NodeDeriver.php
  • core/modules/node/src/Plugin/migrate/D7NodeDeriver.php
  • core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php
  • core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php
  • core/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php
  • core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php
  • core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php

This may potentially break backward compatibility if a module extends one of the above listed classes and calls parent constructor.

So far I found only one contributed module extending one of these classes. Since it doesn't call parent constructor the change should not affect it. Of course we are not aware about modules in custom projects.

Proposed resolution

Remove the property and remove the argument from the constructor.

A little bit of history - the property first appeared on a deriver in #2028511: Allow plugin derivative classes to use services from the container β†’ and was not even used then.

Remaining tasks

User interface changes

None

API changes

@todo

Data model changes

None

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
PluginΒ  β†’

Last updated about 17 hours ago

Created by

πŸ‡·πŸ‡ΊRussia Chi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

Production build 0.69.0 2024