Skip to content

Add more IDE links in console output #29585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicolas-grekas opened this issue Dec 12, 2018 · 10 comments
Closed

Add more IDE links in console output #29585

nicolas-grekas opened this issue Dec 12, 2018 · 10 comments
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Feature

Comments

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Dec 12, 2018

With #29168, we now have an opportunity to improve DX by making some texts clickable.

Eg clicking on a route in the output of the debug:router could open the IDE to its controller if there is one.
I'm sure there are more outputs that could benefit from it.

@chalasr chalasr added Feature DX DX = Developer eXperience (anything that improves the experience of using Symfony) labels Dec 12, 2018
@nicolas-grekas
Copy link
Member Author

debug:autowiring & debug:container could also link to the source.

@yceruto
Copy link
Member

yceruto commented Dec 13, 2018

(+) debug:twig <template_name> (matched file, overridden file, etc) & debug:form (classes) could also link to the source. :)

@mablae
Copy link
Contributor

mablae commented Dec 13, 2018

  • debug:event-dispatcher : Jump to listeners/subscribers

@ro0NL
Copy link
Contributor

ro0NL commented Dec 14, 2018

would like to see <class>App\Link\This</class> as well as <file>/link/this.txt</file> 😍

@mablae
Copy link
Contributor

mablae commented Dec 14, 2018

@ro0NL You mean doing the actual lookup and resolving to ide links inside the OutputFormatter?
Interesting idea!

@nicolas-grekas
Copy link
Member Author

Side note: ClassStub and CliDumper already contain all the logic me might want to implement these improvements. I'm not suggesting we should use VarDumper - but copy/pasting some code might be fine.

@ostrolucky
Copy link
Contributor

I would ideally want to see integration with FrameworkBundle's ide option

@mablae
Copy link
Contributor

mablae commented Dec 15, 2018

@ostrolucky Yeah, basically all suggestions in this issue a refering to that.

nicolas-grekas added a commit that referenced this issue Dec 20, 2018
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] Use hyperlinks in CliDescriptor

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | Part of #29585   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Leverages #29168 to add the hyperlink directly on the source text instead of printing below:

#### Before (or with `symfony/console < 4.3`)

![capture d ecran 2018-12-14 a 16 37 18](https://user-images.githubusercontent.com/2211145/50012891-1e2efe00-ffc0-11e8-9e07-b5358cb057bd.png)

#### After

![capture d ecran 2018-12-14 a 16 12 13](https://user-images.githubusercontent.com/2211145/50012921-25560c00-ffc0-11e8-92cd-d6efd43419f9.png)

Commits
-------

e54e219 [VarDumper] Use hyperlinks in CliDescriptor
@nicolas-grekas
Copy link
Member Author

Closing as there is nothing specific to keep track of.
Please send PRs adding links if you spot more places where it would make sense.

@vctls
Copy link

vctls commented Jan 15, 2024

Just found out about this after all this time. 😄
Is there a native way of applying this to exception traces as the first PR suggested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Feature
Projects
None yet
Development

No branches or pull requests

7 participants