Skip to content

Conversation

@SerafimArts
Copy link
Contributor

@SerafimArts SerafimArts commented Feb 7, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

IntelliJ IDEA / PHP Storm does not support hrefs (TBD: Perhaps only on Windows OS?)

This fix detects that the console was launched from an IDEA environment by IDEA_INITIAL_DIRECTORY env variable and disables href rendering.

Unit tests are missing, because it cannot be tested in simple ways.

UPD: Added tests by analogy with the proposal in #49274 (comment)

Before

image

After

image

@alexislefebvre
Copy link
Contributor

Unit tests are missing, because it cannot be tested in simple ways.

Can we use something like this?

putenv('TERMINAL_EMULATOR='.$terminalEmulator);

@SerafimArts SerafimArts requested a review from chalasr as a code owner February 8, 2023 00:36
@SerafimArts
Copy link
Contributor Author

@alexislefebvre Thanks, added. This allowed me to find another problem that I corrected.

@stof
Copy link
Member

stof commented Feb 8, 2023

Isn't the JetBrains-JediTerm ternminal emulator already covering the case of the IntelliJ platform ?

@SerafimArts
Copy link
Contributor Author

SerafimArts commented Feb 8, 2023

@stof nope. Perhaps this variable is available only on the Linux, because on Windows it is not available.

I don't have x11 on my system at the moment to test this behavior from under wsl.

@alexislefebvre
Copy link
Contributor

I had the same issue with Symfony 4.4 (:see_no_evil:) and this PR helped me, thank you.

I defined this environment variable when running the tests:

image

SerafimArts pushed a commit to php-type-language/parser that referenced this pull request Mar 10, 2023
@fabpot fabpot force-pushed the feature/idea-without-cli-url branch from 3670b93 to f995db4 Compare March 25, 2023 09:27
@fabpot
Copy link
Member

fabpot commented Mar 25, 2023

Thank you @SerafimArts.

@fabpot fabpot merged commit 0550259 into symfony:5.4 Mar 25, 2023
This was referenced Mar 31, 2023
@MrMitch
Copy link

MrMitch commented Mar 31, 2023

@SerafimArts Sorry if that's off topic, but are you using a custom icon theme for PHPStorm ? If so, would you mind sharing it ? I really like the look and feel shown in your screenshots.

@SerafimArts
Copy link
Contributor Author

@MrMitch this is default PHPStorm icons with "One Dark Vivid" theme.

@MrMitch
Copy link

MrMitch commented Mar 31, 2023

@SerafimArts thank you !

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.

7 participants