Reputation: 23582
When using the Symfony2 plugin for PHPStorm, I sometimes see a Weak Route warning:
What does it mean?
Upvotes: 80
Views: 8694
Reputation: 713
I finally fixed this issue for my situation (Symfony 2.8 / PhpStorm 2016.3).
It's similar to @Atmarama 's solution but I think my version of PhpStorm (2016.3) is different and/or Symfony 2.8.
My solution also doesn't involve the deprecated
setting. I hope this will help others:
In PhpStorm go to Languages & Frameworks > PHP > Symfony > Routing
and add the path to appDevProjectContainerUrlGenerator.php
.
In my case this is:
var/cache/dev/appDevDebugProjectContainerUrlGenerator.php
Upvotes: 9
Reputation: 2623
Check path to file urlGenerator
For me right path is:
var/cache/dev/appDevDebugProjectContainerUrlGenerator.php
And after make click to button "Clear Index" above
Upvotes: 3
Reputation: 319
I also get the same problem and in my case, because i use '/' to declare the render template instead of ":" Changing from "/" to ":" cleared that warning in my case
Upvotes: -1
Reputation: 23582
Worked it out. The Symfony2 plugin parses the appDevDebugProjectContainer.php
file to get route and service information. However this file is only recompiled when the web page is loaded which means newly created routes are not included.
To get around this the plugin also parses the config files but this is not 100% reliable so routes discovered in this way are marked as "weak". Reloading the web page will make the warning go away.
Upvotes: 123