Skip to content
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

[Console][VarDumper] Ignore href for PhpStorm terminal emulator #29668

Merged
merged 1 commit into from Dec 29, 2018
Merged

[Console][VarDumper] Ignore href for PhpStorm terminal emulator #29668

merged 1 commit into from Dec 29, 2018

Conversation

ogizanagi
Copy link
Member

@ogizanagi ogizanagi commented Dec 22, 2018

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29613 (comment)
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.

Copy link
Member

@nicolas-grekas nicolas-grekas left a 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;
Copy link
Member

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?

Copy link
Member Author

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 😄

@chalasr
Copy link
Member

chalasr commented Dec 29, 2018

Thank you @ogizanagi.

@chalasr chalasr merged commit 0f65a76 into symfony:master Dec 29, 2018
chalasr pushed a commit that referenced this pull request Dec 29, 2018
…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
@ogizanagi ogizanagi deleted the fix-href-break-phpstorm branch December 29, 2018 07:42
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants