I am getting this error with Laravel 9, I have PHP 8.1.7 installed Show
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". I can see other have asked the question, bit non of the solutions seem to be working asked Jul 3 at 12:50
3 I had the same problem and it was because I configured a version of PHP 8.1 on the command-line while I kept the PHP module at 8.0. So PHP_VERSION_ID gave me 80020, while php -v gave me 8.1.7. It reminded me to reconfigure the PHP Module to PHP version 8.1:
And then everything worked like intended. Reference:
hakre 187k48 gold badges419 silver badges803 bronze badges answered Jul 6 at 14:00
eirieleiriel 1012 bronze badges 1 TIPS Add this lines in
Or set the version:
And run answered Aug 31 at 11:32
I had this same issue while I downgraded my php to v7.4 from 8.1. I somehow messed up with php7.4-fpm mod. However, when I again tried to upgrade my php v8.1 composer started to complain about that error. I simply removed my both php versions that's 7.4 and 8.1 and re-installed only 8.1, which fixed my issue. To remove, here are the steps I followed....
and then finally,
answered Sep 1 at 22:46
HumayunHumayun 9567 silver badges13 bronze badges If @eril answer did not help you by disabling old PHP version
also check composer using a correct version of PHP
if composer about already shows a correct version of PHP,then check to see the real PHP binary path that composer is using by putting
in my case, an old version of php-fpm was enabled.
answered Sep 16 at 23:17
osyanosyan 1,6662 gold badges24 silver badges50 bronze badges It's just until I find how to solve it but it's working So that's what i've done :
Just find the php folder of your server answered Aug 30 at 0:56
1 How fix composer detected issues in your platform your composer dependencies require a PHP version >= 8.1 0?To Solve Composer detected issues in your platform: Your Composer dependencies require a PHP version Error You Just need to install composer with ignore platform check and it will ignore platform and then your error will be solved.
How do you solve composer detected issues in your platform your composer dependencies require a PHP version UNK 7.3 0?Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3. 0". Solution: You could use the easiest way: add --ignore-platform-reqs option to composer install/composer update to ignore all platform requirements.
Which PHP version is used by composer?In my case, both of these use my default php script (which is version 7.4). So, while the 7.2 version is used to run Composer, the scripts called by Composer use the default command. Actually, what the platform option is important for is resolving the requirements, so you should add it (in your project composer. json).
How do I update dependency composer?Updating dependencies to their latest versions#
To update to the latest versions, use the update command. This will fetch the latest matching versions (according to your composer. json file) and update the lock file with the new versions.
|