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

jhodgdon created an issue. See original summary.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

jhodgdon’s picture

Status: Postponed » Needs review
StatusFileSize
new26.02 KB
new10.08 KB

Since #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.

andypost’s picture

Title: ReplaceDrupal\help_topics\HelpTopicDiscovery with core/lib Twig discovery class » Replace Drupal\help_topics\HelpTopicDiscovery with core/lib Twig discovery class

fix typo in title and rtbc+1 to the patch, when parent will be commited

jhodgdon’s picture

Status: Needs review » Postponed

Until the other issue is committed, making status on this one Postponed.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.