I've got a site smoothly running on Drupal 9.4.8 and PHP 8.1. Now I would like to enable APCu in PHP, but my provider unfortunately has installed APCu for PHP 8.0 only. If I simply switch to PHP 8.0, my Drupal installation gives me a an error message:

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

Which steps do I have to do, in order to make my site work in PHP 8.0?

1 Answer 1


Assuming the platform on which you set dependencies is running a different version of PHP than 8.0, you do the following:

  1. Ensure that if there is a direct php dependency in the requires section of composer.json, that it is >=8.0 or similar.
  2. Set a target platform version with composer config platform.php 8.0.24. The specific version you put here does not have to match the server platform's version exactly.
  3. composer update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.