Having the same problem today also.
Multiple Forge PHP versions don't reflect in code.
I've used Forge to install a version of PHP7.3 as CLI on my PHP7.2 server. Then I've got a project that has now been set under meta from php7.2 to 7.3
I've rebooted the server.
Now when I use Tinker and run phpversion() it returns
7.2.25-1+ubuntu16.04.1+deb.sury.org+1
If I try to deploy an app that was running on PHP 7.3 locally the composer.lock info tries to install 7.3 compatible stuff and fails with a 'Not compatible with 7.2' error
Where does each site set its PHP version info and how can I check that it's installed correctly?
The team at Forge put me on the right track.
I needed to update to environment variables. Instead of composer it's $FORGE_COMPOSER etc
$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader
( flock -w 10 9 || exit 1
echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock
if [ -f artisan ]
then
$FORGE_PHP artisan migrate --force
fi
Also, I was testing using Tinkertool and tinker but what I failed to grasp was that to run those I was selecting the wrong version of php by running php artisan tinker from the command line.
Please or to participate in this conversation.