Haehnchen / idea-php-symfony2-plugin

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

Route parameter auto-complete inconsistent #2246

Open drjayvee opened 10 months ago

drjayvee commented 10 months ago

I've noticed three issues with auto-complete suggestions. I'm reporting them all in one issue because they seem very related. Let me know if I should create separate issues for each.

I'm using PHPStorm 2023.2.3 on Windows 10 with the paid version of the plugin. ❤️

1. No parameters for Route('')

When using a route prefix, any route that uses just the prefix path does not show its parameters in auto-completion.

Routes completion

2. Auto-complete depends on method call

Depending on how I call the UrlGeneratorInterface, I either do or do not get auto-complete for parameters.

Routes parameter completion

PHPStorm auto-completes the route names either way, but it does not complete parameters when using $this->path().

3. Twig path function only auto-completes if quoted

The title says it all.

Routes parameter completion in Twig

Since {{ path('some_slash', {id: 1337}) }} is perfectly valid, I would expect the auto-complete to work.