Problem 1
- This package requires php >=7.2 but your PHP version (7.1.19) does not satisfy that requirement.
How can I go about bumping the version of PHP from 7.1.x to 7.2.x? Should I just update Trellis instead (although I’ve done that once before and it wasn’t much fun!)
I think you can change these to php-7.2 from php-7.1. (You could look at the same file on master for reference: https://github.com/roots/trellis/blob/master/roles/php/defaults/main.yml). Then you should just be able to re-provision and it’ll switch to PHP 7.2. You may need to manually stop 7.1 and start 7.2 once after the re-provision (I had to do this a couple times when updating PHP, but that issue may have been solved since then).
Thanks for the pointers @alwaysblank - I was poking around in Trellis and it did look like PHP 7.2 was already set as the default, which I have now confirmed it is…
from site/ on a Tellis, Bedrock & Sage 9 stack might return this?
$ composer require "mwdelaney/sage-bootstrap4-navwalker"
Using version ^1.2 for mwdelaney/sage-bootstrap4-navwalker
./composer.json has been updated
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.2 but your PHP version (7.1.19) does not satisfy that requirement.
Installation failed, reverting ./composer.json to its original content.
EDIT
I think the reference to PHP 7.1.19 not satisfying the requirements refers to the version of PHP installed on my mac - I’m not sure how this plays into anything, or why its referenced over PHP installed on the vagrant machine, but worth noting nonetheless. I guess I’m still a little confused about how all of this works.
If you use vagrant ssh to log into your VM and run composer whatever, it uses the version of PHP specified in Trellis. If you run composer whatever without sshing into your VM, it uses the version of PHP your Mac has. Running composer update in /site on your Mac will still use your Mac’s version of PHP–it doesn’t somehow reach into your VM and use that version.