idea-php-symfony2-plugin
idea-php-symfony2-plugin copied to clipboard
missing route
Similar to previous bug report and the comment that was posted after the bug was closed, this error re-appeared for me. The suggestion from that bug was:
replace use Symfony\Component\Routing\Annotation\Route;
with use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
;
however the latter is deprecated. In trying I noticed that simply removing the use Symfony\Component\Routing\Annotation\Route;
line, saving the file, then re-adding the exact same line and saving the file again removes the error message in my twig file.
It seems that modifying the Route
annotation in my controller triggers a re-scan of the missing route message. Perhaps it would be good to be able to force a re-scan of routes. This would help clear hundreds of 'missing route' messages in my codebase!
Hello,
I have the same problem. I have missing route, but all exists. I use PHPStorm 2019.1.2 and Symfony 4.3 beta. It's very strange, because it works on other project not in symfony 4.3...
don't hesitate to ask me if you need more information.
Thansk
Same issue with symfony 4.3 in PhpStorm 2019.2 EAP Build #PS-192.5118.33, built on June 13, 2019
+1
For me none of use statements working, geht always 'route not found'
Same issue with symfony 4.4.8, PhpStorm 2020.1.1 Build #PS-201.7223.96, symfony Support plugin 0.20.195 Both use statements show the same behaviour, removing and re-adding does not help, invalidating cache does not help, I don't use the @user annotation (as suggested to be the cause of the problem in the other bug report), some routes are still marked as "missing" even though they work all right.
This issue seems to be caused by change of urls dumping format into 4.3 (see #28865 in Symfony).
This was addressed into #1438, so issue may be worth to be closed.
For me, it seems any annotation that comes right after the starting php tag causes the missing route warnings; see screenshots.
Symfony: 5.4.3 PHPStorm: 2022.1.2 (Build #PS-221.5787.33, built on June 1, 2022) Symfony Support Plugin: 0.23.216 → 2022.1.230
I have found that using a custom PHP Routing path (in Preferences -> PHP -> Symfony -> Routing) that points to var/cache/dev/url_generating_routes.php
seems to address the issue, but it'd be nice if the plugin could recognize this file itself.
Problem:
No Problem: