Closed
Description
Symfony version(s) affected: 4.1.0-beta
Description
When using "name_prefix" to prefix all names of some imported routes AND when defining an internationalized route, it's not possible to generate a route with the normal route name (not including the locale with the dot).
How to reproduce
- Add a name_prefix for some imported routes
front:
resource: ../../src/Controller/Front
type: annotation
prefix: /
name_prefix: front_
- Add an internationalized route in a controller matched by the previous definition
/**
* @Route({
* "fr": "/test-fr",
* "en": "/test-en"
* }, name="home_test")
* @Template
*/
public function test(): array
{
return [];
}
- You can't generate a route for "front_home_test", which would use the current locale, as excepted, you can only generate a route for "front_home_test.fr" and "front_home_test.en". If you remove the name_prefix and include "front_" inside the name of the route, it works as excepted.