Debug console commands are one of the key parts of the Symfony debugging experience. In Symfony 5.3 we improved them with new features and new commands.
Debug Events by Event Dispatcher¶
Contributed by
Timo Bakx
in #39276.
The recent features introduced in the Security component have changed the number of event dispatchers Symfony applications have by default. Each firewall now defines its own dispatcher, whereas the debug:event-dispatcher command only displays the default dispatcher. In Symfony 5.3 we added a new --dispatcher option to display the events associated to the given event dispatcher: 1 2 3 4 5 6 7 8 9 10 11 12 13$ php bin/console debug:event-dispatcher --dispatcher=security.event_dispatcher.main
Registered Listeners of Event Dispatcher "security.event_dispatcher.main" Grouped by Event
"Symfony\Component\Security\Http\Event\LogoutEvent" event
Order Callable Priority
1 Symfony\Component\Security\Http\EventListener\CsrfTokenClearingLogoutListener::onLogout() 0
Better Event Debugging¶
Contributed by
Tobias Nyholm
in #39323.
In Symfony 4.3 we started moving away from strings to name events in favor of using fully-qualified class names. This makes your code simpler, but it complicates the usage of the debug:event-dispatcher command when you want to filter by event. 1 2 3 4 5 6 7 8 9 10# you need to type the entire event FQCN to debug it $ php bin/console debug:event-dispatcher Symfony\Component\Mailer\Event\MessageEvent
Order Callable Priority
1 Symfony\Component\Mailer\EventListener\MessageListener::onMessage() 0
2 Symfony\Component\Mailer\EventListener\EnvelopeListener::onMessage() -255
3 Symfony\Component\Mailer\EventListener\MessageLoggerListener::onMessage() -255
In Symfony 5.3 we improved this command to search for events using its full name or any part of it. That’s way the following commands produce the same result as above: 1 2 3 4 5$ php bin/console debug:event-dispatcher Mailer $ php bin/console debug:event-dispatcher mailer $ php bin/console debug:event-dispatcher MessageEvent $ php bin/console debug:event-dispatcher messageEvent $ php bin/console debug:event-dispatcher messageevent
New Command to Debug Firewalls¶
Contributed by
Timo Bakx
in #39326.
As part of the recent improvements related to security, in Symfony 5.3 we’ve added a new command to debug security firewalls. Run the command without arguments to list the firewalls or pass a firewall name to debug it: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40$ php bin/console debug:firewall main
Firewall "main"
Option Value
Name main
Context main
Lazy Yes
Stateless No
User Checker security.user_checker
Provider security.user.provider.concrete.app_user_provider
Entry Point App\Security\LoginFormAuthenticator
Access Denied URL
Access Denied Handler
User switching
Option Value
Parameter test
Provider security.user.provider.concrete.app_user_provider
User Role ROLE_SWITCH_POSSIBLE
Event listeners for firewall "main"
"Symfony\Component\Security\Http\Event\LoginSuccessEvent" event
// ...
Authenticators for firewall "main"
// ...
Sponsor the Symfony project.
Войдите, чтобы добавить комментарий
Другие сообщения в этой группе

Symfony security includes several significant improvements and new features in Symfony 7.3.
Deprecate eraseCredentials() Method… https://symfony.com/blog/new-in-symfony-7-3-security-improvements?utm_

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:
June 10-11: Workshop days June 12-13: Online conference days in English. All talks will be available for replay as soon

Contributed by Antoine Bluchet in

Contributed by Nicolas Grekas in

This week, we published the second beta of Symfony 7.3, ahead of its final release later in May 2025. Meanwhile, we continued sharing posts about the new features of Symfony 7.3 and the upcoming Symfo

Symfony 7.3.0-BETA2 has just been released. This is a pre-release version of Symfony 7.3. If you want to test it in your own applications before its final release, run the following commands:

The Symfony Mailer component provides many security-related features like signing and encrypting email messages. In Symfony 7.3 we're pushing those features even further to give you greater control an