diff --git a/src/Authorization/EventSubscriber/AbstractGetAttributeSubscriber.php b/src/Authorization/EventSubscriber/AbstractGetAttributeSubscriber.php index fadd9913c4201ab2230807f5ba9c60781e26b214..79b1d4e760ced3395a44f43b32efbe9f749c5974 100644 --- a/src/Authorization/EventSubscriber/AbstractGetAttributeSubscriber.php +++ b/src/Authorization/EventSubscriber/AbstractGetAttributeSubscriber.php @@ -11,7 +11,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterface { /** @var array */ - private $eventStack; + private $eventStack = []; public static function getSubscribedEvents(): array { @@ -21,11 +21,6 @@ abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterfac ]; } - public function __construct() - { - $this->eventStack = []; - } - public function onGetAvailableAttributes(GetAvailableAttributesEvent $event) { $event->addAttributes($this->getNewAttributes()); @@ -34,6 +29,7 @@ abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterfac public function onGetAttributeEvent(GetAttributeEvent $event) { try { + dump($this->getNewAttributes()); array_push($this->eventStack, $event); $attributeName = $event->getAttributeName();