Problem/Motivation
See #2818653: Allow object-based plugin definitions to be processed in DefaultPluginManager::findDefinitions() for similar. Object base definitions cannot use PluginDependencyTrait and need to be able to.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2821191-pdt-8-PASS.patch | 11.66 KB | tim.plunkett |
| #8 | 2821191-pdt-8-FAIL.patch | 3.03 KB | tim.plunkett |
| #8 | 2821191-pdt-8-interdiff.txt | 3.61 KB | tim.plunkett |
| #5 | 2821191-pdt-5.patch | 8.05 KB | tim.plunkett |
| #5 | 2821191-pdt-5-interdiff.txt | 6.19 KB | tim.plunkett |
Comments
Comment #3
tim.plunkettComment #4
tstoecklerI realize that this is just a
@seeand not runtime code, but nevertheless we should not be introducing knowledge about Drupal's config system to the plugin component. That is just unnecessary coupling. If we want this, it should be in a separate interface in\Drupal\Core\Config.Comment #5
tim.plunkettHonestly this is such a niche concept, IMO it's really only useful for derivative when the deriver knows things the plugin doesn't.
Otherwise, \Drupal\Component\Plugin\DependentPluginInterface::calculateDependencies() should be used instead.
Therefore, moving this to a trait and new interface.
Comment #6
jibranThis makes sense.
Comment #7
xjmNote that issues like this should be targeted against 8.4.x, but can be considered for backport once they are committed to that branch. See the updated alpha release policy. Thanks!
Comment #8
tim.plunkett@effulgenstia pointed out this was missing explicit test coverage, and that it is a bug (since the code in HEAD would fatal due to no is_array() check).
Comment #10
effulgentsia commentedTicking credit boxes for reviewers.
Comment #13
effulgentsia commentedThanks! Pushed to 8.4.x. And cherry picked to 8.3.x, because this is a low-disruption bug fix.