Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Steady-Entertainment's avatar

PHP 7.4 and 7.4.6 and php 8 conflicts?!

I get this when I run composer update

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php 7.4 but your php version (7.4.6) does not satisfy that requirement.

https://imgur.com/E2QBltn

0 likes
9 replies
siangboon's avatar

how the composer.json file look like, "php": "^7.4"?? try composer selfupdate ??

chucklin72's avatar

@Sinnbeck I've encountered the same issue in sail up laravel.test_1 | Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.15. php -v shows PHP 8.0.10 (cli) (built: Aug 26 2021 15:36:17) ( NTS ) I've reinstalled composer

Sinnbeck's avatar

@chucklin72 Ok? If it isnt working with any of the solutions provided, then please make a new thread

Steady-Entertainment's avatar

Now I accidentally upgraded to php 8.0

now I am getting this

Testing started at 11:41 ...
/usr/local/Cellar/php/7.4.6_1/bin/php /Users/reniar/code/LivewireTest/vendor/phpunit/phpunit/phpunit --configuration /Users/reniar/code/LivewireTest/phpunit.xml --teamcity
Failed loading /usr/local/opt/php/lib/php/20190902/opcache.so:  dlopen(/usr/local/opt/php/lib/php/20190902/opcache.so, 9): image not found
PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.6. in /Users/reniar/code/LivewireTest/vendor/composer/platform_check.php on line 24

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.6. in /Users/reniar/code/LivewireTest/vendor/composer/platform_check.php on line 24

Process finished with exit code 255
Steady-Entertainment's avatar

- Root composer.json requires php ^7.4.6 but your php version (8.0.0) does not satisfy that requirement.

I am really confused now

What does the php version in my composer.json say?

Sinnbeck's avatar

It tells the user what version is required to run your code. You can add more than one option if you wish

"php": "^7.4|^8.0",
1 like
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Lets say that I inherit your project. Or we work on it together. Then I know that it should work in both 7.4.x and 8.0.x. Lets say that you dont support 7.1 anymore, then I cannot run the project if I am still running php 7.1 and it will force me to upgrade.

1 like

Please or to participate in this conversation.