This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Routing
Nicolas Grekas d246e941ab minor #35926 [Routing] Fix some wrong localized routes tests (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Fix some wrong localized routes tests

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

~~Since https://github.com/symfony/symfony/pull/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".

https://github.com/symfony/symfony/pull/35855 also causes a BC break on one case:
```php
$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.

Commits
-------

99ae55ff1a [Routing] Fix some wrong localized routes tests
2020-03-02 18:19:11 +01:00
..
Annotation Fix CS 2020-02-04 10:32:40 +01:00
DependencyInjection Merge branch '3.4' into 4.1 2019-01-16 19:21:11 +01:00
Exception Allow \Throwable $previous everywhere 2019-11-12 15:51:11 +01:00
Generator Merge branch '4.3' into 4.4 2020-01-04 14:00:46 +01:00
Loader [Routing] Add locale requirement for localized routes 2020-02-15 15:51:21 +01:00
Matcher Merge branch '4.3' into 4.4 2019-12-01 09:39:58 +01:00
Tests minor #35926 [Routing] Fix some wrong localized routes tests (fancyweb) 2020-03-02 18:19:11 +01:00
.gitattributes Add .gitignore to .gitattributes 2019-10-12 01:35:04 +01:00
.gitignore
CHANGELOG.md [Routing][Config] Allow patterns of resources to be excluded from config loading 2019-10-24 13:56:35 +02:00
CompiledRoute.php Add return types to internal & magic methods when possible 2019-08-22 15:18:41 +02:00
composer.json Allow Symfony 5.0 2019-05-28 17:53:17 +02:00
LICENSE Update year in license files 2020-01-01 12:03:25 +01:00
phpunit.xml.dist Bump phpunit XSD version to 5.2 2018-11-11 12:18:13 +01:00
README.md Update links to documentation 2020-01-04 13:05:51 +01:00
RequestContext.php Merge branch '3.4' into 4.3 2019-11-30 14:16:45 +01:00
RequestContextAwareInterface.php [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
Route.php [Routing] Prevent localized routes _locale default & requirement from being overridden 2020-03-02 17:08:48 +01:00
RouteCollection.php cleanup remaining param and internal Intl FulLTransformer 2019-08-08 16:35:53 +02:00
RouteCollectionBuilder.php Merge branch '3.4' into 4.3 2019-08-14 14:26:46 +02:00
RouteCompiler.php [Routing] Improve localized routes performances 2020-02-25 13:41:09 +01:00
RouteCompilerInterface.php [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
Router.php Merge branch '4.3' into 4.4 2020-01-08 18:29:02 +01:00
RouterInterface.php [Routing] added a warning about the getRouteCollection() method 2019-08-04 04:46:49 +02:00

Routing Component

The Routing component maps an HTTP request to a set of configuration variables.

Resources