It’s my first real attempt to switch to roots stack and things get kinda funky:
Trellis, Bedrock are working after battle with nfs permissions … but when I want to add Sage to the combo and install Acorn i get this:
Fatal error : Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.2.0”. You are running 8.1.26. in /srv/www/proreture-crm.pl/current/web/app/themes/proreture/vendor/composer/platform_check.php on line 24
Okey, cool so I install php 8.2 on Vagrant:
php -v output:
PHP 8.2.13 (cli) (built: Nov 24 2023 08:47:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.13, Copyright (c) Zend Technologies
with Zend OPcache v8.2.13, Copyright (c), by Zend Technologies
At this point I am more then confused. Any idea?
Are you installing Acorn 3.x?
Otherwise, will need more info to help like your
composer.json if you have added any other dependencies, etc.
Yes Acorn 3.3 via cli and no other dependencies. Just installed trellis + bedrock and then sage + acorn in theme directory ( also same happened when installed acorn in bedrock directory )
So you are using
composer CLI from your workstation against the files that are mounted from within the Vagrant VM? Then your own workstation PHP version is also relevant (see update-alternatives).
well I have also checked my own php version and it is 8.3. At the moment I have switched to DDEV local and works properly so far so good
This error happens when you are running
composer commands from different environments that have different PHP versions
For Trellis users, it’s recommended to run all
composer commands from the VM to avoid this issue
You cannot install Sage or Acorn from your host machine that is using a PHP version that doesn’t match your Trellis PHP version
okey, that makes sense. Thanks but would stick to ddev for now i think.
DDEV is a good option! I’m glad you’re up and running