Steve Grunwell

Open-source contributor, speaker, and coffee snob

Resolving PHPUnit issues on VIP Quickstart

I ran into this issue on my WordPress VIP Quickstart Vagrant box today while attempting to run PHPUnit:

Figuring something had gone wonky with my server, I destroyed and re-provisioned my Vagrant box, only to get the following errors:

Ugh. As it turns out, PHPUnit has EOL‘d the PEAR installation method, which the VIP provisioner seems to use. There’s a ticket on Quickstart’s GitHub repository, but there doesn’t seem to be a coded patch at the time of this writing.

To resolve the issue in the short term, SSH into your VIP Quickstart instance and run the following to remove the PEAR version of PHPUnit:

If you’re using a freshly-provisioned box, you might get an error like ‘unknown channel “phpunit” in “phpunit/PHPUnit”‘ – if so, don’t worry about it and go ahead and move on.

Then, you can install the PHPUnit PHAR globally by running the following, though you might also just load PHPUnit as you need it via Composer:

Note: The mv command may require the use of sudo!

If you have problems with moving from PEAR to the PHAR, this article goes a bit more in-depth on the process.

Hopefully this saves someone else some time.

Previous

Recap: CodeMash 2015

Next

The Direction of the Blog in 2015

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Be excellent to each other.