Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Events/DI/EventsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ protected function bindEventProperties(Definition $def, \ReflectionClass $class)
}

$dispatchAnnotation = self::propertyHasAnnotation($property, 'globalDispatchFirst');
$def->addSetup('$' . $name, [
$def->addSetup('$' . $name . '[]', [
new Statement($this->prefix('@manager') . '::createEvent', [
[$class->getName(), $name],
new PhpLiteral('$service->' . $name),
Expand Down
2 changes: 1 addition & 1 deletion src/Events/EventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function setExceptionHandler(IExceptionHandler $exceptionHandler)
* @param string $eventName The name of the event to dispatch. The name of the event is the name of the method that is invoked on listeners.
* @param \Doctrine\Common\EventArgs $eventArgs The event arguments to pass to the event handlers/listeners. If not supplied, the single empty EventArgs instance is used
*/
public function dispatchEvent($eventName, DoctrineEventArgs $eventArgs = NULL)
public function dispatchEvent($eventName, ?DoctrineEventArgs $eventArgs = NULL)
{
if ($this->panel) {
$this->panel->eventDispatch($eventName, $eventArgs);
Expand Down