Open files in PHPStorm from you Symfony application

less than 1 minute read

If you want to open files in PHPStorm8 directly from the Symfony debug toolbar there is a neat trick you can use. This is very helpful when you quickly want to find a controller or when you got an exception.

// /config/packages/framework.yml
  ide: "phpstorm://open?file=%%f&line=%%l"

You could also do this trick locally on your machine instead. That will not conflict with other developers in your team and it will work for all your projects.

; php.ini

; Alternative link syntax:

And that is pretty much it. You dont need to install PhpStormOpener, LinCastor or any other Apple script. This will work with PHPStorm8+, Symfony2.6+ and Mac OSX.

Below is a picture to show where you should click to make PHPStorm open the controller used in this request.

PHPStorm8 Symfony debug toolbar

Read more about this feature in the Symfony documentation.

Leave a Comment