only in patch2: unchanged: --- a/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php +++ b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php @@ -46,13 +46,13 @@ public function getDefinitions() { // Register the namespace of classes that can be used for annotations. AnnotationRegistry::registerAutoloadNamespace('Drupal\Core\Annotation', array(DRUPAL_ROOT . '/core/lib')); // Get all PSR-0 namespaces. - $namespaces = drupal_classloader()->getNamespaces(); - foreach ($namespaces as $ns => $namespace_dirs) { + $prefixes = drupal_classloader()->getPrefixes(); + foreach ($prefixes as $ns => $prefix_dirs) { // OS-Safe directory separators. $ns = str_replace('\\', DIRECTORY_SEPARATOR, $ns); - foreach ($namespace_dirs as $dir) { + foreach ($prefix_dirs as $dir) { // Check for the pre-determined directory structure to find plugins. $prefix = implode(DIRECTORY_SEPARATOR, array( $ns,