Since ^1.10 version of PhpInsights, you can add links to files in PhpInsights output.
Prerequisite & Troubleshouting
Links in terminal work thanks to
from 4.3 version. Be sure you are using this version with
composer info symfony/console.
If your terminal does not support hyperlinks, they will be rendered as normal and non-clickable text.
That's why it's recommended to check out the list of terminal emulators that support hyperlinks.
phpinsights.php file, add the config
'ide' => 'myide'.
<?php return [ // ... 'ide' => 'vscode', // ... ];
You can fill
ide config with the followings values:
The phpstorm option is supported natively by PhpStorm on MacOS.
You may also have to enable the command-line launcher.
If you use another editor, the expected configuration value is a URL template
that contains an
%f placeholder where the file path is expected and
placeholder for the line number.
<?php return [ // ... 'ide' => 'myide://open?url=file://%f&line=%l', // ... ];