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
Allow to display links on created files #559
Allow to display links on created files #559
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @l-vo!
Sorry for the slow review. I think this is a really cool idea :). Instead of injecting the FileLinkFormatter
and $fileLinkFormat
into FileManager
, could you create a new service (maybe MakerFileLinkFormatter
) that handles this logic? It would also handle all the \033]8;;{$href}\033\\{$text}\033]8;;\033\\
type of stuff. Then we can inject that into FileManager.
Thanks!
4def163
to
7ced5ea
Compare
Hi @weaverryan
No problem :) I created a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VERY close now. Could you also add at least one simple test for MakerFileLinkFormatter
- just to make sure we don't have a really ugly error in there.
Thanks - I'm looking forward to this!
e36a4c8
to
1991ec7
Compare
If debug.file_link_format container parameter or framework.ide is configured and terminal supports links
1991ec7
to
b1553d8
Compare
Updated 🙂 |
Well-done! A very nice new feature - thank you @l-vo! |
I was just about to suggest such a feature ;-) However, this kinda means that it's not working for me :-( What's the expected behavior? Since you're saying "only displayed if the terminal support it", which link syntax are you using? What I would have expected is a clickable link in this line after
I committed a similar feature to phpstan and Codeception. |
@ThomasLandauer It's because |
@l-vo thanks! However, I just found out that the line I'm talking about is generated here in this bundle at https://github.com/symfony/maker-bundle/blob/main/src/Maker/MakeMigration.php#L129 So what does your PR do then? I tried it with |
No, look here: maker-bundle/src/Maker/MakeMigration.php Line 111 in f76abb1
doctrine:migrations:diff command. Excepted if your terminal is not compatible, it's working for make:controller .
|
This PR aims to display terminal links on the created file paths when the
framework.ide
configuration param (ordebug.file_link_format
container parameter) is set (only displayed if the terminal support it).