PhpStorm and IntelliJ tips

PhpStorm I find Jeffrey Way’s series on PhpStorm extremely useful even after 2 years of using the software. Please check out his series on laracast.com. On the other hand, Jeffrey uses a Mac therefore he’s keyboard layout and keymap preferences are somewhat different from mine. Feel free to adapt whatever you like from both of us. My keys were only really tested on Debian linux. Short keys Alt+0: Toogle Project window.
Where I’m coming from? I mostly work with PHP and JS at work. I code a fair bit in Go, some in Python and less in some more languages in my free time. As most devs, I’m always in love with my current toolset, especially with my editors and IDEs. I started writing code in Notepad++ a long-long time ago. Later I used Dreamweaver (I regret to admit), Eclipse, Netbeans, Sublime Text and “finally” PhpStorm.
Story I came across a new tool called phpmetrics. It can be used for, what a surprise, calculating and displaying metrics for php. I fell in love with the tool in an instance and decided to run it on some php projects that I consider important. I’m aware of the fact that the list is far from complete, but it’s probably still worth a look. I especially love the “maintenability” (sic!
Prerequisite So I’m lately enjoying Go as my language of choice and Hugo is an open source site generator written in Go. It is a new project when you compare it to alternatives like Wordpress or Joomla but even when compared to the big fish of the genre: Jekyll. Since I haven’t done any blogging for ages, I had the urge to start over from scratch, hopefully lasting longer and having a much better sprint this time.
So you’ve set up your IDE to debug your webapp. Cool. It’s time to set it up for command line scripts too. No worries, it’s going to be a whole lot faster.
I actually thought that setting up Jenkins to properly test a PHP based application is hard. Then I tried to do the same for JavaScript… I’m currently half way there, but I think I already learnt enough to make up for a quick post. As an effort to make the code for this blog as clean and good as possible, I decided to set up Jenkins. It wasn’t a big deal until I made my mind up that the frontend part should also be tested there.

Don't Die

Your unit tests are broken, you need to figure out what happened. You analyze the stack trace and open up the file you feel to be guilty of the error. You put some var_dump statement - maybe you’ll put it in some pre in there and then just die(). It doesn’t help much, so you open up the next file and start again, maybe copy-paste your “debugger-statements”. We have all been there, but please, don’t do it again!