In #1849752: Abstract non-Drupal-specific parts of AnnotatedClassDiscovery into a Drupal\Component base class, AnnotatedClassDiscovery was split in two.

However, now that #1966246: [meta] Introduce specific annotations for each plugin type is starting to extend Core\AnnotatedClassDiscovery, it's evident that a custom Discovery class needs access to all 3 parameters from Component\AnnotatedClassDiscovery.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
1.42 KB
tim.plunkett’s picture

Issue tags: +Quick fix

Tagging

EclipseGc’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Quick fix

This looks totally reasonable to me.

Eclipse

tim.plunkett’s picture

Issue tags: +Quick fix

Lost the tag.

dawehner’s picture

What about adding a test coverage?

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

I tried to type out "we don't need tests" but I couldn't do it :)
Also going to fix the docblocks.

dawehner’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests +Plugin system
FileSize
8.78 KB

Added a test.

tim.plunkett’s picture

+++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.phpundefined
@@ -0,0 +1,55 @@
+    // Manually include the PluginExamle file, so that the doctrine annotation

Typo, Example

+++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.phpundefined
@@ -0,0 +1,55 @@
+    $namespaces = array('Drupal\plugin_test' => DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib');
...
+      'Drupal\plugin_test\Plugin\Annotation' => DRUPAL_ROOT . 'core/modules/system/tests/modules/plugin_test/lib',

One has a / before core, the other doesn't.

tim.plunkett’s picture

FileSize
1.52 KB
8.54 KB

Ah! That explains the include_once.

Thanks so much @dawehner! This should be done now.

EclipseGc’s picture

Status: Needs review » Reviewed & tested by the community

cool by me!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.