Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Routing] Fix some wrong localized routes tests #35926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Mar 2, 2020

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Since #35855, the _locale path param is directly substituted so those tests are not valid cases anymore. Instead, the path directly contain the right locale. Actually, the compilation is done after, so instead we need to set the new requirement in all tests to reflect the "reality".

#35855 also causes a BC break on one case:

$compiledUrlGenerator->generate('foo.fr', ['_locale' => 'en']))

Previously, the generated route would be the /en/fourchette. Now that the locale is hardcoded in the route path, it will always be /fr/fourchette. I changed foo to relevant words because it is easier to understand like that.

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Mar 2, 2020
@fancyweb fancyweb force-pushed the routing-fix-localized-routes-test branch from 7c8ed68 to c0d8b9c Compare March 2, 2020 16:29
@fancyweb fancyweb force-pushed the routing-fix-localized-routes-test branch from c0d8b9c to 99ae55f Compare March 2, 2020 16:31
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

@nicolas-grekas nicolas-grekas merged commit d246e94 into symfony:4.4 Mar 2, 2020
@fancyweb fancyweb deleted the routing-fix-localized-routes-test branch March 2, 2020 18:36
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.