public function __construct(EventDispatcherInterface $eventDispatcher, MetadataFactoryInterface $metadataFactory, ParserInterface $parser, KernelInterface $kernel) { parent::__construct($eventDispatcher, $metadataFactory, $parser); $this->kernel = $kernel; }