Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291123

Allow plugins to be discovered in any directory

$
0
0

In #1987298: Change notice: Shorten directory structure and PSR-0 namespacing for plugins we combined the $owner and $type into $subdir.
However, \Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery::getPluginNamespaces() hardcodes $namespaces\Plugin\$subdir, preventing any true flexibility.
In addition, it also requires a $subdir, preventing plugins from residing in top level directories.

Now that #2042545: Annotation parsing should ignore @file doxygen is in, we can have plugin files wherever we want, but not by using AnnotatedClassDiscovery.

This patch does three things:

  • Makes $subdir optional, and moves it to be the second parameter for AnnotatedClassDiscovery
  • Forces the plugin manager to declare the full subdir (including Plugin\)
  • Adds test coverage for placing a plugin at the top level (Drupal\$provider)

Viewing all articles
Browse latest Browse all 291123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>