question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Collapsing twig path routes stored only in .idea/workspace.xml

See original GitHub issue

When 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:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
NicoHaasecommented, Nov 7, 2016

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.

0reactions
Haehnchencommented, Feb 5, 2017

@NicoHaase thx for this clarification @axelbest in plugin settings just disable all Code Foldings if you dont need this feature

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found