Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #6754 Add default locale to all pretty routes (danut007ro)
This PR was squashed before being merged into the 4.x branch. Discussion ---------- Add default locale to all pretty routes This PR is a fix for an issue I'm having in tests with a multilingual app using pretty urls. The issue does not occur when using old urls. My issue is that I had the following error when generating urls in tests using `CrudTestUrlGeneration` trait ``` Some mandatory parameters are missing ("_locale") to generate a URL for route "admin_..." ``` This exception is thrown in [UrlGenerator](https://github.com/symfony/symfony/blob/7.2/src/Symfony/Component/Routing/Generator/UrlGenerator.php#L150) when no locale is found in route defaults, request context or parameters. When NOT using pretty urls, the `_locale` is present in [route defaults](https://github.com/symfony/symfony/blob/7.2/src/Symfony/Component/Routing/Generator/CompiledUrlGenerator.php#L55), but when using pretty urls there is no locale. The PR adds the default `_locale` for all routes generated by EasyAdmin. Commits ------- 7ae7911 Add default locale to all pretty routes
- Loading branch information