PHP version for Composer

Hey there,

Wondering if there is a way to connect composer to Local so that I don’t get this message:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- This package requires php ^7.0.10 but your PHP version (5.5.38) does not satisfy that requirement.

1 Like

Hey Justin,

You can install Composer in a site container by doing the following:

  1. Right-click on the site and go to “Open Site SSH”
  2. Enter apt-get update && apt-get install -y curl
  3. Enter curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  4. After that, you can immediately use composer
5 Likes

Awesome! Thank you.

So now, how do we get past using PHP 7.0.3 in Local?

2 Likes

Curl didn’t work for me here, but wget did via this thread: Permissions for Composer installs