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.

14 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

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>