What is a "weak route" in Symfony 2?

Tamlyn picture Tamlyn · May 28, 2014 · Viewed 8.6k times · Source

When using the Symfony2 plugin for PHPStorm, I sometimes see a Weak Route warning: Weak route

What does it mean?

Answer

Tamlyn picture Tamlyn · May 28, 2014

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.