Skip to content
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

[Routing] Fix some wrong localized routes tests #35926

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.

@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.

None yet

3 participants