-
API Testing with Runscope
04 January 2016
Read moreI work with a lot of APIs and I really appreciate good tools. Lately I've been really enjoying using Runscope for testing and monitoring my APIs so I thought I'd share how I work with this tool, which has a great one-person free tier *and* the ability to import/export tests so if you need to work with a team with just the free tier (the examples here are from an open source project which is an obvious use case where it's hard to fund tools), it's clunky but doable. The idea here is just to show you around how to create your own API tests with Runscope (and also to write down what I did so I can point both my future self and others at this!)
-
Relying on A Dev-Master Dependency in Composer
22 December 2015
Read moreI recently tweeted this:
If your project installation instructions recommend requiring dev-master in composer, I may need to reconsider my choice of package
— Lorna Mitchell (@lornajane) December 2, 2015
-
Insert Data with Phinx
18 December 2015
Read moreDatabase patching is a wicked hard problem, one that's got a bit easier in my world lately as I've been using Phinx on a few projects. I like Phinx because it avoids the numbered-patches problem by using date stamps as part of its patch naming and it is pretty smart about creating the correct forward and backward changesets from a single change() description.
One thing I didn't immediately find was how to insert data.
-
Generating a File List for Phan
27 November 2015
Read morePhan is the PHP Analyzer for PHP 7 code. I've been using it, partly out of curiosity, and partly to look at what the implications of upgrading my various projects will be. The simplest usage instructions are:
phan -f filelist.txt
I generated my filelist.txt files with …
-
Git Won't Check Out A Path It Autocompleted
10 November 2015
Read moreOne of my git repositories has developed a tendency to refuse to checkout a feature branch locally that exists on the remote repo. My git bash completion works, but then strange things happen! It turned out to be that I had two remotes with the same refspec, so I thought I'd write down the behaviour I saw and hopefully help someone else to fix this problem faster if they see it.
-
Why My Open Source Project Needs a Code of Conduct
21 October 2015
Read moreI'm an open source project maintainer, working on the projects associated with joind.in, and recently we added a Code of Conduct to all our projects (we have quite a few as you can see from our github organisation page https://github.com/joindin).
I feel the same way about codes of conduct for open source projects as I do about codes of conduct for events. You can absolutely run a totally safe and effective event without one, but by having one you make very clear what your expectations are - and in turn this manages the expectations of the people attending that event.
-
PHP: Calling Methods on Non-Objects
19 October 2015
Read morePHP has subtly changed the wording of this error between various versions of the language, which can trip up your log aggregators when you upgrade so I thought I'd give a quick rundown of the changes around the "call to member function on non-object" error in PHP, up to and including PHP 7 which has an entirely new error handling approach.
-
Ada Lovelace Day: The Allies
13 October 2015
Read moreIt's Ada Lovelace day, a day when we celebrate women in technology. This year I'd like to mention a group of people who make the biggest difference in the tech life of any minority: the allies.
-
PHP Learning Path from O'Reilly
01 October 2015
Read moreI'm very excited to announce that some of my content is featured in the PHP Learning Path from O'Reilly. The Learning Paths are a good way to buy a bundle of content from different people on related topics, and the introductory pricing is always a good deal! Their newest offering …
-
New in PHP 7: null coalesce operator
30 September 2015
Read moreNot the catchiest name for an operator, but PHP 7 brings in the rather handy null coalesce so I thought I'd share an example.
In PHP 5, we already have a ternary operator, which tests a value, and then returns the second element if that returns true and the third if it doesn't:
-
Joind.in at the PHPNW Hackathon
25 September 2015
Read more
It's PHPNW time again, and that means hackathon! This conference has a strong tradition of hands-on building as well as the usual talks you'd expect to see, and next week will be no exception to that as there's a hackathon on Friday night before the main conference on Saturday and Sunday. If you're at the event then make sure you sign up for your hackathon ticket, it's always a good experience.Joind.in is one of the featured projects and I'm one of the maintainers, so I'll be at the hackathon and I'm hoping that we'll get quite a few things done during the evening. Joind.in is an ideal project for events like this since it's easy to get started with it, and we have a development platform virtual machine (that we'll have already downloaded onto USB sticks so no conference wifi delay) so you can be up and running in no time. We also have a specific label on our bug tracker for items that we think are manageable for people who don't already know the system, so chances are that if you want to, you'll be able to contribute to an open source project with something finished by the end of the night.
-
Git Pull Causes a Merge
03 September 2015
Read moreIf you type git pull and expect a fast-forward update, but get a merge instead, don't panic! This usually happens when we're collaborating on a branch with other people, and we've made changes on our local version of a branch, and someone else (or the other you, if you use git to sync between multiple dev platforms) has made changes to the remote version of a branch in the meantime. It also happens really frequently in teams where all commits are to the master branch ... yet another reason to have a decent branching strategy.
All that's happened is something like this: