`use TraitName` breaks find_use command.
See original GitHub issueWhen there are traits in use within a class, the find_use
command is broken.
This is due to the use
keyword having more than one meaning, dependent on context. One meaning is to “import” or “alias” a namespaced class. Another meaning is to “insert” a trait, and another meaning is to import a variable from an outer scope.
It seems that SublimePHPCompanion’s find_use
command is only taking the first meaning into account. It feels like the command simply looks for the nearest use
keyword and adds the imports there. If a use
keyword exists inside a class definition, everything breaks causing syntax errors.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
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 FreeTop 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
Top GitHub Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is what I expect:
This is what I actually get: