skip to Main Content

I have installed PHP8.1 but something seems odd.

It looks like it’s missing some files:
enter image description here

The error I get is:

Fatal error: Composer detected issues in your platform: Your Composer
dependencies require a PHP version ">= 8.1.0". You are running 7.4.3.
in /home/vagrant/code/project/vendor/composer/platform_check.php on
line 24

But PHP -v shows:

enter image description here

I read something about ~/.bash_aliases and noticed there is no function for version 8.1.

function php74() {
    sudo update-alternatives --set php /usr/bin/php7.4
    sudo update-alternatives --set php-config /usr/bin/php-config7.4
    sudo update-alternatives --set phpize /usr/bin/phpize7.4
}

Seeing that a function needs php-config and phpize, tells me something went wrong with creating those file and writing the new function.

Anyone got some experience with this, or should it be enough to manually create these files?
I don’t wanna make a bigger mess.

Back To Top
Search