Description
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!