Collapsing twig path routes stored only in .idea/workspace.xml
See original GitHub issueWhen clicking on “A” tag href attribute paths like this in .twig files
/someController/someAction/{id}
they turn into corresponding route as described in controller annotation (e.g.
'some_action', {'id': someID}}
the code is folded correctly, but the changes are stored only in .idea/workspace.xml
file
In this case we loose the opportunity to see changes in vcs history (on the left side next to line numbers) - and so on we can’t upload the collapsed and well-formed twig files into git.
I assume that most of developers won’t push .idea folder into the git repository.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Creating and Using Templates (Symfony Docs)
First, you need to create a new file in the templates/ directory to store the ... Use the path() Twig function to link...
Read more >PhpStorm 2022.1 (221.5080.224 build) Release Notes
Idea become slow in responses and constantly use ~25% of CPU even when idle. Bug, IDEA-290163, Path completion should work for WSL path...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Let’s pick up on your last sentence, cause this is the essence of your view for me: the main task of an IDE is to help you develop software better. And in this case, it means to display the real URL parts even if they are not persisted in the twig files. If you do not like this behaviour, use the IDEs settings and disable it, so that everyone sees the raw route paths, as you defined them in the routing.yml
As you asked for why the plugin won’t change the file contents: well. If you want to see the real URL there, just put it there on your own. A basic part of the routing system is that you buy yourself the flexibility of changing the frontend routes at a single place (in this case routing.yml), while using technical names internally. You want to change the URL for a controller? Do it once in a configuration file, and Symfony will take care to use the changed URL in all places where you referenced them through their keyword. If you don’t like this feature, just don’t use it.
@NicoHaase thx for this clarification @axelbest in plugin settings just disable all Code Foldings if you dont need this feature