Bedrock 1.7.1 on OSX 10.11.5 (composer php requirement error)

Latest Bedrock, latest OSX, php requirement error?

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php >=5.6 but your PHP version (5.5.17) does not satisfy that requirement.

Option 1: SSH into your local vagrant machine and run composer install / composer update that way. This will make use of the dev server’s version of PHP.
Option 2: Update your system’s PHP

I wanted to do option 2, or at least have it be an option for those edge cases when I need to run composer update without waiting on spinning up a local instance, or try running it outside of SSH by accident. Here’s the steps for that! :grinning:

I didn’t want to mess with OSX too much so went with this non-destructive install:

Head on over to: - and grab a one liner command to install a version 5.6 or higher (I went with v7 stable).

This will add a php version to /usr/local/php-whatever-the-version-is. Also in /usr/local/ will be an alias called “php5” which points to that newly created folder.

In order to make use of the new php version, you’ll also need to add an export PATH line your .profile file (instructions on that page).

If you’re using a shell edit those accordingly.
(E.g. I’m using ohmyzsh and just added the ‘export PATH’ line to my existing .oh-my-zsh/custom/aliases.zsh file).

1 Like