PHPnews.io

Overview for 'roballen'

Using Phive to manage PHPUnit

Written by Rob Allen / Original link on Jan. 4, 2017

I recently came across the Phive project and have had a play with it. Phive is part of phar.io and is intended to manage development tools such as PHPUnit in preference to using Composer's dev dependencies. The main advantages of Phive are that it uses the phar file of the tool and only keeps one…


2016 in pictures

Written by Rob Allen / Original link on Dec. 31, 2016

Another year has passed which gives me an excuse to to reflect on what's happened. As usual, I look at the photos that I've taken and frame my thoughts around them. January At the very end of January I visited Phoenix, Arizona to see Evan, Priscilla & other friends. I also attended FOSDEM again…


SSH keys in macOS Sierra

Written by Rob Allen / Original link on Dec. 27, 2016

Now that I've upgraded to macOS 10.12 Sierra, I noticed that SSH required me to enter my passphrase to keys every time I used them. This was a surprise as it's not how 10.11 El Capitan worked. This is how to fix it. Firstly, add your SSH key's passphrase to the keychain using ssh-add -K ~/.ssh/id_r…


Handling JSON data errors in Slim 3

Written by Rob Allen / Original link on Nov. 16, 2016

When you send JSON data into a Slim Framework application with a content-type of application/json, then Slim will decode it for you if you use getParsedBody(): $app->post("/", function ($request, $response, $args) { $input = $request->getParsedBody(); var_dump($input);exit; }); Using curl to…


Use curl to create a CouchDB admin user

Written by Rob Allen / Original link on Oct. 5, 2016

This too me longer to find than it should have done, so I'm writing it here for future me. When you install CouchDB, it is in a mode where anyone can do anything with the database including creating and deleting databases. This is called "Admin Party" mode which is a pretty cool name, but not what…


PHPNW 2016 API Tutorial

Written by Rob Allen / Original link on Sep. 28, 2016

If you're attending my Building Modern APIs in PHP tutorial at PHPNW 2016, please bring a laptop with the following installed: * PHP 7 with the sqlite extension installed * curl command line tool * https://akrabat.com/stuff/2016-09-30-PHPNW-Slim-API-Tutorial.zip extracted to a convenient directory…