I recently migrated a Forge-hosted project to Laravel 8.x. The deployment script fails when running composer install
, all of the messages related to having the wrong PHP version:
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 ^7.4 but your PHP version (7.3.26) does not satisfy that requirement. Problem 2 - Installation request for lcobucci/clock 2.0.0 -> satisfiable by lcobucci/clock[2.0.0]. - lcobucci/clock 2.0.0 requires php ^7.4 || ^8.0 -> your PHP version (7.3.26) does not satisfy that requirement. ...
I did this though.
At least according to the documentation. PHP 7.4 is selected in Meta > PHP Version for this site. In PHP Management, 7.4 is default and is updated to latest patch.
I restarted PHP, then Nginx, then the entire server, none of it worked.
Via SSH it is using 7.3.26:
forge@mistaken-identity:~$ php -v PHP 7.3.26-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 13 2021 08:00:44) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.26, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.26-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
Is Forge's PHP management API broken, or just on my server? I would like to be able to set PHP version on a per-site basis. How can I fix this?
https://stackoverflow.com/questions/65803848/laravel-forge-upgrading-project-to-laravel-8-needs-php-7-4 January 20, 2021 at 01:59PM
没有评论:
发表评论