Problem/Motivation
We have a custom plugin discovery class in Help Topics, to discover the topics in Twig templates.
On #3075427: Create TemplateDiscovery for plugin managers to use we are trying to get something very similar into the core/lib area.
If that happens, this issue would make
Drupal\help_topics\HelpTopicDiscovery
either go away or inherit from that with a small customization.
Proposed resolution
Figure out how to use the core class and do it. Unit tests for the custom class could either go away or be revised to only test the remaining custom bits.
Remaining tasks
Make a patch.
User interface changes
None
API changes
Drupal\help_topics\HelpTopicDiscovery would either go away or inherit from the core/lib class. Help Topics is experimental so this is OK.
Data model changes
None
Release notes snippet
TBD
Comments
Comment #4
jhodgdonSince #3075427: Create TemplateDiscovery for plugin managers to use is getting close, I thought I'd upload a patch here, which:
- Uses the core class as the base for our custom discovery
- Removes some generic tests that are done in the core space, while leaving the tests that are specific for help topics.
- Fixes one line in one test because the core class has a more generic expected error message than what was in the custom class.
I've uploaded two patches:
a) The patch that should eventually be for this issue. It will fail testing right now because the class from the other issue doesn't exist yet.
b) That plus the latest patch on #3075427: Create TemplateDiscovery for plugin managers to use, so it can actually be tested now.
Comment #5
andypostfix typo in title and rtbc+1 to the patch, when parent will be commited
Comment #6
jhodgdonUntil the other issue is committed, making status on this one Postponed.