I got a site that's still running PHP 5.6. I need to push a small update.
As part of the update I was working on I updated the composer.lock file because I had also updated from an old Homestead installation to a newer one.
My Homestead.yml got something like this to make Homestead operate with PHP 5.6:
sites:
- map: mysite.local
to: /home/vagrant/mysite-local/public
php: "5.6"
However, when I pushed to forge (staging for testing) I got a failure email:
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0].
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.5) does not satisfy that requirement.
Problem 2
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.5) does not satisfy that requirement.
- laravel/framework v5.2.45 requires doctrine/inflector ~1.0 -> satisfiable by doctrine/inflector[v1.2.0].
- Installation request for laravel/framework v5.2.45 -> satisfiable by laravel/framework[v5.2.45].
So I appear to have updated composer.lock with packages that required PHP 7.
(I recently got a new computer, so I set up everything fresh - this time with PHP7 on my local system and a newer Homestead that supported multiple PHP versions.)
So my question now is, how can I regenerate composer.lock with a dependency set that's compatible with PHP 5.6?
(Also, how does it work with Homestead and sites you have set to PHP 5.6? When I SSH into the vagrant box, and cd into the project folder php -v yields PHP 7.1. Is it only when serving the website that PHP5.6 is used?)
-Thom