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

afoysal's avatar

PHP version

Which PHP version is appropriate for these errors ?

  Problem 1
    - Root composer.json requires php ^7.1.3 but your php version (8.1.10) does not satisfy that requirement.
  Problem 2
    - dompdf/dompdf is locked to version v0.8.6 and an update of this package was not requested.
    - dompdf/dompdf v0.8.6 requires php ^7.1 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 3
    - laravel/framework is locked to version v5.8.38 and an update of this package was not requested.
    - laravel/framework v5.8.38 requires php ^7.1.3 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 4
    - league/iso3166 is locked to version 2.1.5 and an update of this package was not requested.
    - league/iso3166 2.1.5 requires php ^7.0 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 5
    - beyondcode/laravel-dump-server is locked to version 1.3.0 and an update of this package was not requested.
    - beyondcode/laravel-dump-server 1.3.0 requires php ^7.1 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 6
    - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested.
    - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 7
    - phar-io/manifest is locked to version 1.0.3 and an update of this package was not requested.
    - phar-io/manifest 1.0.3 requires php ^5.6 || ^7.0 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 8
    - phar-io/version is locked to version 2.0.1 and an update of this package was not requested.
    - phar-io/version 2.0.1 requires php ^5.6 || ^7.0 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 9
    - phpunit/php-code-coverage is locked to version 6.1.4 and an update of this package was not requested.
    - phpunit/php-code-coverage 6.1.4 requires php ^7.1 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 10
    - phpunit/phpunit is locked to version 7.5.20 and an update of this package was not requested.
    - phpunit/phpunit 7.5.20 requires php ^7.1 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 11
    - sebastian/global-state is locked to version 2.0.0 and an update of this package was not requested.
    - sebastian/global-state 2.0.0 requires php ^7.0 -> your php version (8.1.10) does not satisfy that requirement.
  Problem 12
    - dompdf/dompdf v0.8.6 requires php ^7.1 -> your php version (8.1.10) does not satisfy that requirement.
    - barryvdh/laravel-dompdf v0.8.6 requires dompdf/dompdf ^0.8 -> satisfiable by dompdf/dompdf[v0.8.6].
    - barryvdh/laravel-dompdf is locked to version v0.8.6 and an update of this package was not requested.

error

0 likes
1 reply
LaryAI's avatar
Level 58

The errors indicate that the current PHP version installed on the system is 8.1.10, but the required PHP version for the packages being used is 7.1.3 or lower. To resolve this issue, you can either downgrade the PHP version to 7.1.3 or upgrade the packages to versions that are compatible with PHP 8.1.10.

To downgrade the PHP version, you can follow the steps below:

  1. Uninstall the current PHP version using the command:
sudo apt-get remove php8.1
  1. Install PHP 7.1.3 using the command:
sudo apt-get install php7.1
  1. Restart the web server using the command:
sudo service apache2 restart

To upgrade the packages to versions that are compatible with PHP 8.1.10, you can update the composer.json file to specify the latest versions of the packages that are compatible with PHP 8.1.10. For example, to update the laravel/framework package to the latest version that is compatible with PHP 8.1.10, you can add the following line to the composer.json file:

"laravel/framework": "^8.0"

Then run the following command to update the packages:

composer update

This will update the packages to the latest versions that are compatible with PHP 8.1.10.

1 like

Please or to participate in this conversation.