-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console][VarDumper] Ignore href for PhpStorm terminal emulator #29668
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
Conversation
src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php
Outdated
Show resolved
Hide resolved
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.
(if phpstorm adds support for hrefs, we'll need a way to detect it - maybe using a version number in the env var or something else. Comment added in the linked phpstorm issue.)
@@ -54,6 +54,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface | |||
private $background; | |||
private $href; | |||
private $options = array(); | |||
private $handlesHrefGracefully; |
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.
Nitpicking: would $supportsHyperlinks
or $supportsLinks
be a better variable name than $handlesHrefGracefully
?
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.
Not really to me, as "supports" just means to me the terminal is able to render hyperlinks.
Terminals not supporting it doesn't mean they will crash; so they handle it gracefully (ignoring the href), on the contrary of PhpStorm's one 😄
Thank you @ogizanagi. |
…lator (ogizanagi) This PR was merged into the 4.3-dev branch. Discussion ---------- [Console][VarDumper] Ignore href for PhpStorm terminal emulator | Q | A | ------------- | --- | Branch? | master <!-- see below --> | Bug fix? | yes | New feature? | no <!-- 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 | #29613 (comment) <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A So, as explained in #29613 (comment), the hyperlink feature currently breaks the PhpStorm terminal (the output stops abruptly, sometimes the whole terminal emulator freezes). Currently, a simple `dump(new \Exception());` would be enough to break it. Hence I think we should at least ignore hyperlinks for this terminal emulator. 📝 https://youtrack.jetbrains.com/issue/IDEA-204536 feature request has been opened on JetBrains YouTrack. Commits ------- 0f65a76 [Console][VarDumper] Ignore href for PhpStorm terminal emulator
So, as explained in #29613 (comment), the hyperlink feature currently breaks the PhpStorm terminal (the output stops abruptly, sometimes the whole terminal emulator freezes). Currently, a simple
dump(new \Exception());
would be enough to break it.Hence I think we should at least ignore hyperlinks for this terminal emulator.
📝 https://youtrack.jetbrains.com/issue/IDEA-204536 feature request has been opened on JetBrains YouTrack.