Score:1

How to properly downgrade an existing Drupal installation to a lower PHP version?

mx flag

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?

Score:3
id flag

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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.