Skip to content

Conversation

@MatTheCat
Copy link
Contributor

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #61577
License MIT

This allows to use %kernel.default_locale% as default value for _locale routes parameter in a non-HTTP context.

@MatTheCat MatTheCat changed the title [Routing] Initialize router.request_context’s _locale parameter to %kernel.default_locale% [Routing] Initialize router.request_context's _locale parameter to %kernel.default_locale% Oct 9, 2025
@andrew-demb
Copy link
Contributor

Does this change also fix this issue?
#61762

@MatTheCat
Copy link
Contributor Author

@andrew-demb nope, but this would change the RequestContext so that it always have a _locale parameter in a Symfony application.

@fabpot
Copy link
Member

fabpot commented Oct 13, 2025

Thank you @MatTheCat.

@fabpot fabpot merged commit 23337bb into symfony:7.4 Oct 13, 2025
11 of 12 checks passed
@MatTheCat MatTheCat deleted the ticket_61577 branch October 13, 2025 08:08
This was referenced Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UrlGenerator ignores default_locale when generating routes in console/tests

5 participants