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.

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

  1. Yuriy Firs says:

    What about YiiFramework console commands?

  2. Navarr says:

    Don’t forget about Yii :(

  3. Tim Robidoux says:

    I’ll add my request to add Yii support soon

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

  5. Martin Prebio says:

    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 says:

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

      • Daniel Costalis says:

        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.

  6. Pingback: PhpStorm 7.0リリース | JetBrains ブログ

  7. Pingback: Laravel artisan serve in PhpStorm - Stratos Blog

  8. Pingback: Ugh. So much setup. | Craig's Blog

  9. Chris says:

    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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *