diff --git a/core/lib/Drupal/Component/Annotation/Plugin.php b/core/lib/Drupal/Component/Annotation/Plugin.php index 82dd1af..0af3010 100644 --- a/core/lib/Drupal/Component/Annotation/Plugin.php +++ b/core/lib/Drupal/Component/Annotation/Plugin.php @@ -37,9 +37,10 @@ class Plugin implements AnnotationInterface { */ public function __construct($values) { $reflection = new \ReflectionClass($this); - $defaults = $reflection->getDefaultProperties(); - // Remove the protected $definiton from the defaults. - unset($defaults['definition']); + // Only keep actual default values by ignoring NULL values. + $defaults = array_filter($reflection->getDefaultProperties(), function ($value) { + return $value !== NULL; + }); $parsed_values = $this->parse($values); $this->definition = NestedArray::mergeDeep($defaults, $parsed_values); } diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index b64a1dc4..8483177 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -126,7 +126,7 @@ class EntityType extends Plugin { * * @var string */ - public $render_controller_class = 'Drupal\Core\Entity\EntityRenderController'; + public $render_controller_class; /** * The name of the class that is used for access checks.