Closed tjveldhuizen closed 8 months ago
I can confirm this issue.
I suspect this is due to the way Symfony is storing those routes inside /var/cache/dev/url_generating_routes.php
:
[ // ...
'profile_plan.en' => [[], [
'_controller' => 'App\\Controller\\ProfileController::plan',
'_locale' => 'en',
'_canonical_route' => 'profile_plan'
], [], [['text', '/account/plan']], [], [], []],
'profile_plan.fr' => [[], [
'_controller' => 'App\\Controller\\ProfileController::plan',
'_locale' => 'fr',
'_canonical_route' => 'profile_plan'
], [], [['text', '/fr/account/plan']], [], [], []],
I think the plugin should look at the _canonical_route option. When it's set, it means this route is a translation of a base route.
It looks like a fix has been merged for this here: https://github.com/Haehnchen/idea-php-symfony2-plugin/pull/2266
I just updated and it fix the issue for me! Thanks!
Indeed! Great!
The plugin seems to have problems handling localized routes. In this example, the route name in all three of the generated URL's is valid (and working in my application), but only links to a specific locale are found by the plugin.