Adding Doctrine2 binary as Command Line Tool in PHPStorm 6

If you’re loving PHPStorm 6 like I am, you’ll have seen that you can create your own Command-Line Tools. These are basically just in-IDE command aliases that make your life just a little bit simpler.

The Composer support is excellent – if a little flaky to setup sometimes, and I wanted to do something similar for Doctrine2.

PHPStorm 6 does not come with support for the Doctrine2 command-line tool out of the box like Composer, so you’ve got to open up the Preferences, navigate to Command Line Tool Support and hit the little + icon to create a new Custom tool.

 

custom-tool

…and then fill in the values as have here:

options

The $ProjectFileDir$ expression is a macro that can be used in PHPStorm and other JetBrains products.

All that’s left to do is try it out!
Pull up your Command Line Tools Console  in PHPStorm 6 and type “doctrine list

console

…and here’s the output:

output

 

Comments

Leave a Reply

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


9 − three =

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>