-
-
Notifications
You must be signed in to change notification settings - Fork 934
Description
Bug report
I ran into the same problem this person did: phpstan/phpstan-src#4369 (comment)
The $this->relativePathHelper on this line seems like it should be replaced with $this->simpleRelativePathHelper.
As it currently is, relativePathHelper seems to remove any folders that are common to all files that are currently being analyzed. If all the files are in a subdirectory of the current working directory, that subdirectory will be removed from all displayed paths, and then the terminal can no longer match CWD-relative paths.
Example:
Path relative to CWD and phpstan.neon file:
public/admin/user_activity.php
To test my hypothesis, I set and environment variable in the PhpStorm terminal settings
TERMINAL_EMULATOR=NONE
Which takes precedence.
Setting my config to use these:
editorUrlTitle: "\nat %%relFile%%:%%line%%"
editorUrl: "%%relFile%%:%%line%%"because %%relFile%% comes from simpleRelativePathHelper, gives a properly clickable link:
So, all that leads me to believe that switching to simpleRelativePathHelper will resolve the issue.
Code snippet that reproduces the problem
No response
Expected output
Clickable link to file+line in JetBrains terminal.
Did PHPStan help you today? Did it make you happy in any way?
No response