So i just updated composer using the command composer self-update --2
,
However, now my web application shows the error Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0".
I dont understand this because doing php -v
gives me PHP 7.4.13
How can I fix this?
Just run this command. composer install –ignore-platform-reqs and second solution is First of all In you project you can check the platform check file your-project-path/vendor/composer/platform_check. php $issues = array(); Then just remove extra code Or comment it. Add the platform check option in the composer.
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.
Your terminal user's PHP version may differ from the server's version.
You may have 7.4.13 on terminal while having a completely different PHP version in apache2 or whatever server you are using.
Use phpinfo();
in a PHP file and access it via browser to see the actual PHP version.
In you project you can check the platform check file projec-path/vendor/composer/platform_check.php
$issues = array();
after this Remove or comment the extra code
Add the platform check option in the composer.json config section like this.
"config": { "platform-check": false },
After that, you need to run
composer update
After the composer update platform_check.php will be deleted and project work fine.
Please run this command:
composer install --ignore-platform-reqs
If you add the --ignore-platform-reqs
option when running Composer update, it will ignore restrictions. Click here for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With