Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
plugin system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2014 at 05:28 UTC
Updated:
31 Aug 2018 at 10:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tim.plunkettComment #2
jhedstromIt's concerning that our existing tests don't catch this. Would adding tests here be a possibility?
Comment #3
tim.plunkettWell it's not broken per se.
ConditionPluginBase extends ExecutablePluginBase. Having setExecutableManager() on the parent doesn't hurt, but since only ConditionPluginBase::execute() uses it, I figured we could move it.
Comment #5
xanoI think the biggest problem that this patch solves isn't even that only conditions use this, but that it's
ConditionInterfacethat definessetExecutableManager(), butExecutablePluginBasethat implements it.Comment #6
alexpottNo other type plugin other than Conditions (including stuff in contrib) is already using this or would find it useful?
Comment #7
xanoThe only usage of this method is
ConditionManagersetting itself on condition plugins. This looks like a pattern that we should not copy elsewhere, but that in the future should be replaced by proper dependency injection.Comment #8
xano@alexpott: does #7 explain the situation sufficiently, or is there something else you'd like us to do?
Comment #10
xanoRTBC'ing to 'assign' to @alexpott.
Comment #11
alexpottI agree that the implementation is backwards. There are no docs to inherit :)
Committed abb22d7 and pushed to 8.0.x. Thanks!
Comment #14
andypostFiled follow-up #2996431: Fix docs for ConditionPluginBase