Haehnchen / idea-php-symfony2-plugin

IntelliJ IDEA / PhpStorm Symfony Plugin
https://plugins.jetbrains.com/plugin/7219
MIT License
910 stars 138 forks source link

[Twig] Escaping route names with backslashes #2348

Closed freerich closed 1 month ago

freerich commented 3 months ago

Since Symfony 6.4 we have route name aliases for invokable controllers. The autocomplete in Twig templates already provides those route aliases, for example in the path() function. But this kind of route aliases have backslashes, so the autocomplete works, but Twig won't like these unescaped strings.

It would be great if the route names were escaped automatically if you used this autocomplete in Twig.

More about this Symfony feature: https://symfony.com/blog/new-in-symfony-6-4-fqcn-based-routes

freerich commented 1 month ago

Thank you @Haehnchen.