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
Subscribe to Blog updates
Thanks, we've got you!