Configurable Status Code in Templates Rendered From Routes
Contributed by Dale Nash
in #41414.
In Symfony applications controllers render templates most of the times. However, you can also render templates from routes config for simple cases where creating a controller would be unnecessary. In Symfony 5.4 we're improving this feature to allow you define the HTTP status code of the response that contains the rendered template (to override the default 200 status applied to these responses):
1
2 3 4 5 6 7
config/routes.yaml
upload_started: path: /upload_started.html controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController defaults: template: 'file_upload/started.html.twig' statusCode: 202 # HTTP Status = Accepted
New innerText() Method in DomCrawler
Contributed by Bilge
in #42338.
The Symfony DomCrawler component eases DOM navigation for HTML and XML documents. In Symfony 5.4 we're improving it with a new innerText() method. It's similar to text() but it only returns the text that is the direct descendant of the current node, excluding any child nodes:
1
2 3 $text = $crawler->filterXPath('//body/p')->innerText(); // if content is Foo Bar // innerText() returns 'Foo' and text() returns 'Foo Bar'
Recursive .gitignore Support in Finder
Contributed by Julien Falque
in #43150
and #43837.
The Symfony Finder component allows you to apply the .gitignore rules of the directory where you are searching. This way you don't need to repeatedly exclude some files or directories from the search:
1
2 3 // if .gitignore file exists in the directory, its contents // are parsed and applied to the file/dir search $finder->ignoreVCSIgnored(true);
In Symfony 5.4 we've improved this feature to better align with Git's default behavior. When enabling this feature, the Finder component will use the .gitignore files of all subdirectories traversed during the search. Also, the rules of subdirectories always override the parent directories rules.
New Command to Debug Environment Variables
Contributed by Christopher Hertel
in #42580.
Configuration based on environment variables is increasingly popular in Symfony applications. Given that many different files can define and override those env vars, in Symfony 5.4 we've added a new debug:dotenv command to help you debug the value of all your env vars and which .env files were checked:
Sponsor the Symfony project.
Jelentkezéshez jelentkezzen be
EGYÉB POSTS Ebben a csoportban

The Routing component provides an impressive list of features to map incoming URLs to your application code. Symfony 7.3 pushes it even further with a set of new features that improve developer experi

Contributed by Mathias Arlaud in

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

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

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

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

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