Skip to content

Commit

Permalink
Information about rel_file support in editorUrl
Browse files Browse the repository at this point in the history
Covers changes from phpstan/phpstan-src#1414
  • Loading branch information
Wirone committed Jun 11, 2022
1 parent 7c43dba commit 21b809e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions website/src/user-guide/output-format.md
Expand Up @@ -57,4 +57,12 @@ parameters:
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
```

<div class="bg-blue-100 border-l-4 border-blue-500 text-blue-700 p-4 mb-4" role="alert">

**Support for analysis executed in virtual environment**

If you run PHPStan analysis within Docker container (or using other virtualisation tool) you may need to use `%rel_file%` instead of `%file%`. This will use file's path relative to your project's directory. In the end your `editorUrl` should have value like this: `phpstorm://open?file=/path/to/your/project/%%rel_file%%&line=%%line%%`.

</div>

To make the text really clickable in your terminal you might need to register the protocol in your system; see [eclemens/atom-url-handler](https://github.com/eclemens/atom-url-handler) for an example.

0 comments on commit 21b809e

Please sign in to comment.