For a long time during my adventure with PHP I was a follower of Open Source for all solutions …. which means that my choice for the IDE was NetBeans. It has code completion, hints, syntax highlighting, projects, frameworks support … who needs more? And it’s free!
Then, a few months ago, a friend of mine convinced me to try PhpStorm. It’s not free anymore … but I thought I’d give it a try … and it was worth it! Not only it’s faster and less prone to crashes but most of all – it has Magicento.
Magicento is a plugin for PhpStorm and really helps Magento development. It’s awesome – saving a lot of time and frustration caused, for example, by typos. Let’s say you need to overwrite a core model. No need to enter the rewrite manually in config.xml. Just create your module, then go to the core class, press Alt+M (Option+M on Mac) and choose ‘Rewrite class’. And you’re done! It doesn’t seem very needed in case of simple frontend models or blocks, but when you think of controllers – rewriting them can be a real source of frustration (for them you have a separate option: ‘Rewrite Controller’).
Magento is known for using factory design pattern to create new objects. Magicento handles it and if you use Ctrl+Left Mouse Button on the factory name, you are provided a list of classes to which the factory may refer. You also get autocompletion in layout and configuration files. Let’s say I need a new helper. I go to config.xml, type ‘h’ and immediately I get a hint ‘helper’. OK, that’s what I want, so I accept the hint and inside of the tag, I open a new tag – don’t even need to type any character. Magicento automatically suggests tag name, basing on the namespace and name of my module (and, of course, you can create the module with Magicento assistance… Alt+M->Create Module 😉 ).
Ah, and the best thing? You can flush cache and enable/disable template hints right from the editor! (and they work for BO, too).