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.
…and then fill in the values as have here:
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“
…and here’s the output: