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

iam_imam's avatar

php version does not satisfy that requirement

hello guys I got a project, but when I want to run them by typing the composer update command, there is an error like this

Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit[5.7.0, ..., 5.7.27] require php ^5.6 || ^7.0 -> your php version (8.1.6) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ~5.7 -> satisfiable by phpunit/phpunit[5.7.0, ..., 5.7.27].

Can anyone help me??

0 likes
4 replies
Sergiu17's avatar

Switch to PHP 5.6 or 7, or update phpunit package

iam_imam's avatar

@Sergiu17 i have change my php version to 7.2.0

PHP 7.2.0 (cli) (built: Nov 29 2017 00:17:00) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

but when i'm trying to update the project, the error is look like this :

Composer 2.3.0 dropped support for PHP <7.2.5 and you are running 7.2.0, please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.

Please or to participate in this conversation.