Follow-up to #1932810: Add entity bundles condition plugin for entities with bundles
Problem/Motivation
Now we have added \Drupal\Core\Entity\Plugin\Condition\EntityBundle in #1932810: Add entity bundles condition plugin for entities with bundles we can deperecate \Drupal\node\Plugin\Condition\NodeType
Proposed resolution
See #1932810-36: Add entity bundles condition plugin for entities with bundles
If we were to add a little logic to the default plugin manager, we could probably include a "deprecated = TRUE" in annotations and hide the plugin from being returned by getDefinitions() but still allow it to be instantiated. That would let us deprecate old plugin from the UI so that users aren't using it going forward and people can, over time unify on this plugin. We can then address anywhere core uses plugins for the 9.x migration when the time comes, or even add in extra logic to the ConditionManager that when "node_type" is requested, we instantiate "entity_bundle:node" instead. Something along these lines should be pretty doable.
Remaining tasks
- Agree on approach.
- Remove @todo from
\Drupal\Core\Entity\Plugin\Condition\EntityBundle
User interface changes
None
API changes
This is BC compatible solution
Data model changes
None.
Comments
Comment #9
berdirWe're already doing the deprecation in the referenced issue.