Command Line Tools Based on Symfony Console (Doctrine, Laravel) in PhpStorm

Ever since PhpStorm 2, we have had support for working with the Symfony console right from within the IDE. Newer versions have added support for other command line tools like Zend Framework, Composer, Symfony2 and Drush. With the latest PhpStorm 7 EAP, we now support tools that are based on Symfony Console component: Laravel’s Artisan and Doctrine.

From the project settings (Ctrl+Alt+S, or Cmd+, on Mac OS X), we can add a new command line tool under the Project Settings | Command Line Tool Support pane. Hitting the green plus “+” opens a window in which we can specify the type of tool we want to add.

Most items are self-explanatory: we just select the tool we want to use from this list. When working with a framework that is not explicitly listed but makes use of the Symfony Console component, we can select the Tool based on Symfony Console option.

For Doctrine, we can specify the path to the command line tool. In a Laravel project, we can now specify the path to artisan which is bundled with the framework. We can also specify an alias for the tool: the full name or a shorter version depending on how we would like to invoke the tool later on.

When hitting OK, PhpStorm will scan the tool’s help output and generate autocompletion information for it. From then on, we can make use of it by opening the Command Line Tools Console window using the Tools | Run Command menu or Ctrl+Alt+X.

We’ve already found a tutorial on how to use this new feature with Magento’s magerun command. Check this blog post for an example.

Give PhpStorm 7 EAP a try and let us hear your thoughts about support for Symfony, Laravel, Doctrine or the IDE in general through the issue tracker, the comments below or in our forums!

Develop with pleasure!
– JetBrains PhpStorm Team

This entry was posted in Cool Feature, Early Access Program and tagged , , , . Bookmark the permalink.
  • Yuriy Firs

    What about YiiFramework console commands?

  • Navarr

    Don’t forget about Yii :(

  • Tim Robidoux

    I’ll add my request to add Yii support soon

    • Mikhail Vink

      Thanks! We’ll surely look into it!

  • Pingback: PhpStorm 7.0 released: PHP 5.5, Vagrant, SSH console, debugger config validation, Drupal, frameworks & more | JetBrains PhpStorm Blog()

  • Martin Prebio

    Is there a possibility to specify environment variables for a single tool or globally?
    Neither FOO=bar "php" ... nor export FOO=bar works :-/

    • Maarten Balliauw

      If you define these variables in the OS (eg bash profile), then yes.

      • Daniel Costalis

        Note that if you add or change your PATH variable (at least on Windows), you’ll need to restart PHPStorm so it can read the new environment variable.

  • Pingback: PhpStorm 7.0リリース | JetBrains ブログ()

  • Pingback: Laravel artisan serve in PhpStorm - Stratos Blog()

  • Pingback: Ugh. So much setup. | Craig's Blog()

  • Chris

    The above didn’t work for me – the MCrypt extension was apparently not installed (it is). The reason MCrypt wasn’t found is because I have php aliased to this:


    For PHPStorm the solution is to configure a different interpreter under Preferences > PHP. The correct path for PHP 5.4.26 under MAMP PRO for me is as above:


    Once I did that, ‘artisan’ could be added as successfully by following the instructions in this article.

  • Marcus Melder

    How can I get PHPStorm to recognize breakpoints for artisan commands?