Northeast PHP 2015


Northeast PHP 2015

This past weekend I attended Northeast PHP for the first time. I was lucky enough to have two talks selected (Unit Testing Done Right and Professional-grade Software Design) and they were both well-received. The audience was very complimentary and I got a few good pieces of feedback to improve my talks later.

The conference was held in Boston (next year in PEI) near MIT and hosted in the Microsoft New England Research Division (NERD) Center. The night before the conference we were treated to a speaker's dinner at Cafe ArtScience, where they demonstrated Le Whaf, a device invented by one of the chefs there to aerosolize liquids (distilled spirits in this case) using ultrasonics and cavitation instead of heat. This let us experience all the aromatic flavors of a tequila without the ethanol burn. That was a really cool experience and I'd love to try it again with other liquids. Here's an article about it if you'd like to read more.

I also got to record an episode of Voices of the Elephpant with Cal Evans, which was a fun experience. I'd recommend taking it him up on the opportunity if you get it. It should be up sometime in the next two months.

The conference itself was fun. I'm rarely in the northeast so I got to meet a number of new speakers and attendees. There was a big focus on testing and microservice architecture in the various tracks, which was great to see. Everyone was friendly and helpful. All in all it was a good experience and if you're in the area I'd check it out next year.

Tags: php, conference

Using PHPUnit's returnCallback for a variable length valueMap


Awkward title aside, this is just a quick post about something I rigged together the other day. I have a mocked service locator object that needed to implement returnValueMap, but where the contents of the valueMap would vary based on which test I was executing. PHPUnit does not natively support modifying the valueMap after it's been assigned, so I wanted a way to append items to the map without re-defining the whole mock for every test.

Read more of this post »

Cloning a base project in PhpStorm


When I first started using PhpStorm (my current IDE) I noticed that I was applying a number of the same project-specific settings during each new project. Being a good (i.e. properly lazy) programmer, I figured that this should be automatable, so I dug into the project metadata that PhpStorm keeps in each project's .idea directory (at least on OS X). I found that with a few string substitutions I could create a template project with all the settings the way I like them, and then clone that metadata directory into each new project I created. You'll find a sanitized version of the script I use in this Github repo. Hope it saves someone out there some time.

Tags: phpstorm, script