New in Symfony 5.4: Profiler improvements

In addition to the redesigned logs panel, Symfony 5.4 includes other improvements related to the Symfony profiler.

Conditional profiling

        Contributed by Kévin Dunglas 
        in #43138.

Symfony profiler provides an immense amount of debug information to quickly find the cause of any problem. However, that comes at a price, because the profiler must collect all that information while serving the request. This can slowdown the application even for requests where you don't look at the profiler information (which are most of them). In Symfony 5.4 you can enable the profiler conditionally. To do that, add these two new config options:

    1

2 3 4 5

config/packages/dev/web_profiler.yaml

framework: profiler: collect: false collect_parameter: 'profile'

The collect: false option disables the profiler by default and the collect_parameter: profile option enables it for requests that include the profile query parameter. You can freely choose the query parameter name and you can also enable the profiler by submitting a form field with that name (useful for POST requests) and even a request attribute.

More security information in the profiler

        Contributed by Nico Haase
        and Robin Chalas 
        in #42800
        and #42582.

First, the web debug toolbar now shows all the security roles of the logged in user. This way you can quickly check both the roles assigned directly to the user and the roles assigned to them via security roles inheritance:

Second, the security profiler panel includes a new tab called "Authenticators" where you can check the security authenticators that were called during the request:

HTML email preview

        Contributed by Grégoire Pineau 
        in #43751.

The Symfony profiler includes an "Emails" panel where you can inspect the details of the emails sent during the processing of the request. When the email is complex, checking its HTML contents is not practical. In Symfony 5.4 we're improving this panel to also preview the rendered HTML contents of the email:

                Sponsor the Symfony project.

https://symfony.com/blog/new-in-symfony-5-4-profiler-improvements?utm_source=Symfony%20Blog%20Feed&utm_medium=feed

Created 3y | Nov 25, 2021, 2:20:12 PM


Login to add comment

Other posts in this group

SymfonyLive Berlin 2025: Need a MACH-ready Search Engine?

SymfonyLive Berlin 2025, conference held in English, will take place from April 1 to 4! The schedule is being revealed gradually. More details are available here.

As we are now unveiling th

Jan 24, 2025, 11:20:16 AM | Symfony
SymfonyLive Paris 2025 : Rôles & permissions : développez une marque blanche avec du Feature Flipping

SymfonyLive Paris 2025, conference in French language only, will take place from March 27 to 28! The schedule is currently being revealed as we go along. More details are available here.

Al

Jan 23, 2025, 4:50:03 PM | Symfony
SymfonyLive Berlin 2025: So you think you know PHPUnit

SymfonyLive Berlin 2025, conference held in English, will take place from April 1 to 4! The schedule is being revealed gradually. More details are available here.

First, a big thank you to

Jan 22, 2025, 8:20:10 AM | Symfony
SymfonyLive Paris 2025 : Passkeys pour une authentification fluide et sécurisée

SymfonyLive Paris 2025, conference in French language only, will take place from March 27 to 28! The schedule is currently being revealed as we go along. More details are available here.

To

Jan 21, 2025, 11:30:10 AM | Symfony
Join us for SymfonyDay Chicago – March 17, 2025!

Mark your calendars for March 17, 2025 because SymfonyDay Chicago 2025 promises to be a one-of-a-kind event that you won’t want to miss! This full day is dedicated to celebrating the incredible contri

Jan 20, 2025, 7:20:03 PM | Symfony
A Week of Symfony #942 (13-19 January 2025)

This week, Symfony celebrated the SymfonyOnline January 2025 conference. In addition, it announced the new Symfony UX Core Team. Lastly, the upcoming Symfony 7.3 version simplified the configuration o

Jan 19, 2025, 8:30:08 AM | Symfony
Announcing the Symfony UX Core Team

The Symfony UX initiative was announced in December 2020. It was introduced to enhance the developer experience by integrating JavaScript tools and libraries more seamlessly with Symfony applications,

Jan 13, 2025, 3:40:04 PM | Symfony