Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0"

Hi, I’m a newbie. I’m done uploading my website files and clicking my domain name it shows

Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.0.0”.

And double-check the composer.json I have “PHP”: “^7.3|^8.0”.

We currently have PHP 7.4, and will replace it with PHP 8.0 soon.

That said, your composer.json says it should work with any version of PHP of 7.3 or higher.

But that doesn’t automatically mean your generated Composer folder works with all those PHP versions. The dependencies you have selected (and their version constraints) may require a higher PHP version too.

And finally, the composer.lock and the vendor folder will have specific versions of packages, and those may be higher than your minimum version requirement and require PHP 8.0.

My recommendation: please try to get a development environment set up with PHP 7.4, and then run composer update with PHP 7.4. If that completes without errors, you can upload the generated vendor folder here.

And if that doesn’t work, you will need to find which dependency requires PHP 8 and downgrade it to a version that supports PHP 7.4.

3 Likes

Got it. I’ll try your recommendation. Thank you, admin

1 Like

I run this command

composer check-platform-reqs

and it gives me result of this

composer-plugin-api 2.0.0 success
ext-ctype 8.0.0 success
ext-dom 20031129 success
ext-fileinfo 8.0.0 success
ext-filter 8.0.0 success
ext-gd 8.0.0 success
ext-iconv 8.0.0 success
ext-json 8.0.0 success
ext-libxml 8.0.0 success
ext-mbstring 8.0.0 success
ext-openssl 8.0.0 success
ext-pcre 8.0.0 success
ext-phar 8.0.0 success
ext-simplexml 8.0.0 success
ext-tokenizer 8.0.0 success
ext-xml 8.0.0 success
ext-xmlreader 8.0.0 success
ext-xmlwriter 8.0.0 success
ext-zip 1.19.1 success
ext-zlib 8.0.0 success
lib-pcre 10.35 success
php 8.0.0 success

Interesting, I didn’t know about that command.

But it’s not really relevant here. That command checks whether your computer (presumably) matches the requirements, not whether your hosting account does.

It does show that you’re running this in PHP 8.0, not on 7.4, so could you please try getting a 7.4 environment?

3 Likes

Okay. Thank you @Admin

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.