bug #9940 [EventDispatcher] Fix hardcoded listenerTag name in error message (lemoinem)
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes #9940). Discussion ---------- [EventDispatcher] Fix hardcoded listenerTag name in error message | Q | A | ------------- | --- | Fixed tickets | N/A | License | MIT Just as the title say, there was a kernel.event_listener string hardcoded in an error message although everywhere else in this class it is stored in the `$listenerTag` property. Commits ------- 8c91537 [EventDispatcher] Fix hardcoded listenerTag name in error message
This commit is contained in:
commit
8fc0cfa442
@ -70,7 +70,7 @@ class RegisterListenersPass implements CompilerPassInterface
|
||||
$priority = isset($event['priority']) ? $event['priority'] : 0;
|
||||
|
||||
if (!isset($event['event'])) {
|
||||
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "kernel.event_listener" tags.', $id));
|
||||
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag));
|
||||
}
|
||||
|
||||
if (!isset($event['method'])) {
|
||||
|
Reference in New Issue
Block a user