Problem

  • BlockManager always uses createInstance() instead of getInstance().

  • This means that BlockManager never knows whether it previously tried to instantiate a plugin and whether that failed.

  • When manually triggering a PHP notice in StaticReflectionParser, you get this:

    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
    Notice: Undefined variable: className in Doctrine\Common\Reflection\StaticReflectionParser->parse() (line 122 of core\vendor\doctrine\common\lib\Doctrine\Common\Reflection\StaticReflectionParser.php).
    
    Doctrine\Common\Reflection\StaticReflectionParser->parse()
    Doctrine\Common\Reflection\StaticReflectionParser->getDocComment()
    Doctrine\Common\Reflection\StaticReflectionClass->getDocComment()
    Doctrine\Common\Annotations\AnnotationReader->collectParsingMetadata(Object)
    Doctrine\Common\Annotations\AnnotationReader->getImports(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations(Object)
    Doctrine\Common\Annotations\AnnotationReader->getClassAnnotation(Object, 'Drupal\Core\Annotation\Plugin')
    Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions()
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\AlterDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinitions()
    Drupal\Core\Plugin\Discovery\CacheDecorator->getDefinition('menu_menu_block:devel')
    Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('menu_menu_block:devel', Object)
    Drupal\block\Plugin\Type\BlockManager->createInstance('menu_menu_block:devel', Array, Object)
    Drupal\block\Plugin\Core\Entity\Block->getPlugin()
    Drupal\block\{closure}(Object)
    array_filter(Array, Object)
    Drupal\block\BlockStorageController->load()
    Drupal\block\BlockStorageController->loadByProperties(Array)
    entity_load_multiple_by_properties('block', Array)
    block_list('sidebar_first')
    block_get_blocks_by_region('sidebar_first')
    block_page_build(Array)
    drupal_render_page(Array)
    Drupal\Core\EventSubscriber\ViewSubscriber->onHtml(Object)
    Drupal\Core\EventSubscriber\ViewSubscriber->onView(Object)
    call_user_func(Array, Object)
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.view', Object)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
    Drupal\Core\HttpKernel->handle(Object, 1, 1)
    Symfony\Component\HttpKernel\Kernel->handle(Object)
    drupal_handle_request()
    
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

EclipseGc’s picture

I think I'm missing some context, can you show what you did in order to do this? I'm going to have trouble helping here until I know what you're doing to get these exceptions.

Eclipse

sun’s picture

Status: Active » Needs review
Issue tags: +Performance, +Entity system, +API clean-up, +Field system, +Plugin system
FileSize
15.9 KB

Let's see what this buys us.

tim.plunkett’s picture

About half of this is #1892462: EntityManager should use the CacheDecorator, I'm hoping you borrowed the code and didn't do all of the same work.

I'd imagine you'll have the same issues with static caching I did.

Status: Needs review » Needs work

The last submitted patch, drupal8.plugin-definitions.2.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
12.46 KB

#1892462: EntityManager should use the CacheDecorator landed, so let's see whether this is any better.

Status: Needs review » Needs work

The last submitted patch, drupal8.plugin-definitions.5.patch, failed testing.

tim.plunkett’s picture

One thought would be to introduce a public resetDefinitions() method on PluginManagerInterface, and PluginManagerBase::resetDefinitions() would just do $this->definitions = array();

Or expand clearCachedDefinitions() to handle that.

Berdir’s picture

Status: Needs work » Postponed (maintainer needs more info)

Not sure if anything here is still relevant, we have fallback plugins and we don't reparse plugins when one is missing AFAIK.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela’s picture

Issue tags: +Bug Smash Initiative

Thanks everyone for contributing to this issue.

As part of the Bug smash initiative, we are triaging issues that are marked 'Postponed (maintainer needs more info)'. Based on Berdir's comment and the lack of any additional information, we believe this issue is no longer relevant so I am marking it 'Closed (outdated)'.

Berdir’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

You didn't actually do that though :)

pameeela’s picture

Whoops! That is an important step. Thanks :)