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

Creato 4y | 25 nov 2021, 14:20:12


Accedi per aggiungere un commento

Altri post in questo gruppo

Symfony UX CVE-2025-47946: Unsanitized HTML attribute injection via ComponentAttributes

Affected versions

Symfony UX symfony/ux-live-component and symfony/ux-twig-component versions <2.25.1 are affected by this security issue.

The issue has been fixed in the 2.25.1 version of these

19 mag 2025, 12:40:14 | Symfony
New in Symfony 7.3: Yaml Improvements

Symfony has been reducing the need for configuration in applications for several years now. Thanks to PHP attributes, you can now configure most things alongside the relevant code, removing the need f

19 mag 2025, 08:10:09 | Symfony
A Week of Symfony #959 (May 12–18, 2025)

This week, development activity focused on polishing Symfony 7.3 ahead of its final release in two weeks. We also continued publishing articles highlighting the new features of Symfony 7.3 and shared

18 mag 2025, 08:50:08 | Symfony
SymfonyOnline June 2025:  Keynote “Symfony in 2025, Scaling to Zero.”

SymfonyOnline June 2025 is almost here, starting in a few weeks on:

June 10-11: Workshop days. June 12-13: Online conference days in English. All talks will be available for replay as soon as

16 mag 2025, 15:10:26 | Symfony
New in Symfony 7.3: Dependency Injection Improvements

Symfony 7.3 introduces several enhancements to the DependencyInjection component that simplify service configuration, make autoconfiguration more flexible, and enable environment-specific aliasing.

S

16 mag 2025, 08:10:11 | Symfony
New in Symfony 7.3: Namespaced Caches

Contributed by Nicolas Grekas in

15 mag 2025, 08:50:14 | Symfony
SymfonyOnline June 2025: Building an Automated Trading System with Symfony

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:

June 10-11: Workshop days. It is possible to attend 1 two-day training or 2 one-day trainings. June 12-13: Online confe

14 mag 2025, 14:30:11 | Symfony