1

I'm on a new development machine, and I'm having issues installing Laravel, Spark, or just about anything that requires anything newer than PHP 5.5.30.

The problem is, I'm using MAMP Pro which IS running PHP 7.0.1. I've also tried to update my system's PHP version to PHP 7 using this tutorial: https://coolestguidesontheplanet.com/upgrade-php-on-osx/

☁  /webroot  spark new app
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

Problem 1
 - This package requires php >=5.6.4 but your PHP version (5.5.30) does not satisfy that requirement.
Problem 2
    - Installation request for laravel/framework v5.3.20 -> satisfiable by laravel/framework[v5.3.20].
    - laravel/framework v5.3.20 requires php >=5.6.4 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 3
    - Installation request for phpunit/php-code-coverage 4.0.1 -> satisfiable by phpunit/php-code-coverage[4.0.1].
    - phpunit/php-code-coverage 4.0.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 4
    - Installation request for phpunit/phpunit 5.6.2 -> satisfiable by phpunit/phpunit[5.6.2].
 - phpunit/phpunit 5.6.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 5
    - Installation request for phpunit/phpunit-mock-objects 3.4.0 -> satisfiable by phpunit/phpunit-mock-objects[3.4.0].
    - phpunit/phpunit-mock-objects 3.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 6
    - Installation request for sebastian/code-unit-reverse-lookup 1.0.0 -> satisfiable by sebastian/code-unit-reverse-lookup[1.0.0].
 - sebastian/code-unit-reverse-lookup 1.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 7
    - Installation request for sebastian/object-enumerator 1.0.0 -> satisfiable by sebastian/object-enumerator[1.0.0].
 - sebastian/object-enumerator 1.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 8
    - Installation request for sebastian/resource-operations 1.0.0 -> satisfiable by sebastian/resource-operations[1.0.0].
 - sebastian/resource-operations 1.0.0 requires php >=5.6.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 9
    - Installation request for sebastian/version 2.0.0 -> satisfiable by sebastian/version[2.0.0].
    - sebastian/version 2.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.

Application ready! Build something amazing.
Downloading Spark...

I don't want to just bypass the required PHP version by editing in the composer file, because I'm not sure if it's causing problems when installing apps or not. None of my Spark or Laravel installations work, they just give a 500 status error, it could be something else, but I was assuming it was this same problem.

Devon Bessemer
  • 34,461
  • 9
  • 69
  • 95
Jono Thorne
  • 51
  • 1
  • 9
  • 1
    Your php cli version seems to be 5.5.30 - if you're working with different applications/frameworks/versions I highly suggest you look into a virtualized/containerized development setup. It will let you spin up one or more environments with whatever libs and versions you need for each individual app. https://box.scotch.io/ https://laravel.com/docs/master/homestead – JimL Oct 25 '16 at 17:19
  • You need to update your PATH, so your "terminal" works with super-duper (yes I am being ironical) MAMP PRO. I do not like virtualization myself, and develop on local environment (if small project + I am only dev on project), but staging server is definitely in use -> production. – Kyslik Oct 25 '16 at 17:50
  • @JimL Giving Homestead a try. Taking for ever to install Vagrant, but hopefully this will fix my issue. I'll let you know if it does. Thanks! – Jono Thorne Oct 25 '16 at 17:51
  • You are Mac OS, install brew and everything else is going to be simple, `brew install php7 --with-apache --without-ldap`, please visit this Q&A http://stackoverflow.com/questions/26493762/yosemite-el-capitan-php-gd-mcrypt-installation – Kyslik Oct 25 '16 at 17:57
  • Possible duplicate of [How to override the path of PHP to use the MAMP path?](http://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path) – Kyslik Oct 25 '16 at 23:22

1 Answers1

0

All fixed. Thanks @Kyslik for your suggestion.

I had previously tried updating my PATH, but for some reason it worked this time. I must have made a mistake before. For reference of anyone else having this issue, I followed this:

How to override the path of PHP to use the MAMP path?

Community
  • 1
  • 1
Jono Thorne
  • 51
  • 1
  • 9
  • Throw MAMP away, learn how your system works(at least basics like setup development environment), thank me later. – Kyslik Oct 25 '16 at 23:21