Skip to content

Commit 577993a

Browse files
authored
[EventDispatcher] Fix position of AddEventAliasesPass
In the note following the change, it's written : Note that ``AddEventAliasesPass`` has to be processed before ``RegisterListenersPass``. But in the code it was the inverse
1 parent 8278533 commit 577993a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/event_dispatcher.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ determine which instance is passed.
235235
use Symfony\Component\EventDispatcher\EventDispatcher;
236236

237237
$containerBuilder = new ContainerBuilder(new ParameterBag());
238-
$containerBuilder->addCompilerPass(new RegisterListenersPass(), PassConfig::TYPE_BEFORE_REMOVING);
239238
$containerBuilder->addCompilerPass(new AddEventAliasesPass([
240239
\AcmeFooActionEvent::class => 'acme.foo.action',
241240
]));
241+
$containerBuilder->addCompilerPass(new RegisterListenersPass(), PassConfig::TYPE_BEFORE_REMOVING)
242242

243243
$containerBuilder->register('event_dispatcher', EventDispatcher::class);
244244

0 commit comments

Comments
 (0)