$this->render('xxxxxx') -> cannot find declaration to go to on (symfony 2.8)
Hi,
One of my project is still in symfony 2 ..., and since severals weeks, unable to navigate on the routes with the render method : $this->render('myview...');
When CTRL + click on myview , i always have the message : cannot find declaration to go to On an other project with symfony 5, it works perfectly ...
Plugin version : 2022.1.258 (full version) PhpStorm version : 2023.2.2 (last)
It was ok before an update, i don't know if it's a PHPStorm update or a plugin update.
I tried to delete .idea/workspace.xml, I try to delete .idea/symfony2.xml
I note in the plugin / routing / parameters, if i click on "reset to default"
There is a list of path with are alls NOT FOUND Ex : app/cache/dev/appDevUrlGenerator.php NOT FOUND ... all NOT FOUND
In my directory I have : app/cache/dev/appDevDebugProjectContainerUrlGenerator.php app/cache/dev/appDevDebugProjectContainerUrlMatcher.php
So i tried to install mannually this 2 path and restart the IDE so i have : app/cache/dev/appDevDebugProjectContainerUrlGenerator.php EXISTS app/cache/dev/appDevDebugProjectContainerUrlMatcher.php EXISTS
but this not resolve the CTRL + Click navigation on Renders ...
Navigation CTRL + Click works well for : function navigation, Routing Yml file to Controller, $this->generateUrl( ...
But not for the Render at end of a controller function ...
Any Idea ?
Thanks,
Mike
Complement : The @ annotion works well : $this->render('@Controller/path/page.html.twig' ... Ctrl click : link is blue and open the page.html.twig.
The classic annotation don't work any more : $this->render('ChaletmontagneAdminLoueurNewBundle:Biens/planning Ctrl click : do nothing, no blue colocation and no page open.
thanks .
Mike
I updated my whole project to the @ syntax to work around this.
In case someone else also likes to do that here is my regular expression replace:
Search: AcmeBundle:(.+)\:(.+\.twig)
Replace: @Acme/$1/$2 (consider that there is no "Bundle" keyword anymore)
you can also enable this "legacy feature":
Great ! thanks !
De : Daniel Espendiller @.> Envoyé : lundi 1 avril 2024 12:34 À : Haehnchen/idea-php-symfony2-plugin @.> Cc : alpium @.>; Author @.> Objet : Re: [Haehnchen/idea-php-symfony2-plugin] $this->render('xxxxxx') -> cannot find declaration to go to on (symfony 2.8) (Issue #2239)
you can also enable this "legacy feature":
image.png (view on web) https://github.com/Haehnchen/idea-php-symfony2-plugin/assets/1011712/06921596-4085-4166-927b-aedf8aaf5d6d
— Reply to this email directly, view it on GitHub https://github.com/Haehnchen/idea-php-symfony2-plugin/issues/2239#issuecomment-2029552435 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOWGY2FLPOLYYTXDOTWW5XTY3EZX3AVCNFSM6AAAAAA55JAFJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRZGU2TENBTGU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AOWGY2C7HGZMCK6A7ZULORDY3EZX3A5CNFSM6AAAAAA55JAFJWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTY7CBTG.gif Message ID: @.*** @.***> >