Drupal 9 to Drupal 10 psr/log upgrade challenge
Nov 26, 2022
During the process of upgrading Drupal 9 to Drupal 10 version, you may encounter the following problem:
Problem
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/core-recommended 10.0.0-rc1@RC -> satisfiable by drupal/core-recommended[10.0.0-rc1].
- drupal/core-recommended 10.0.0-rc1 requires psr/log ~3.0.0 -> found psr/log[3.0.0] but these were not loaded, likely because it conflicts with another require.
Solution 1
Upgrade to Drupal 10 along with consolidation plugin
composer require drupal/core-recommended:10.0.0-rc1@RC drupal/core-composer-scaffold:10.0.0-rc1@RC drupal/core-project-message:10.0.0-rc1@RC consolidation/robo:^4.0 consolidation/site-process:^5.1 -W
Solution 2 (No Brainer)
Remove the composer.lock file &
run composer upgrade with the specified version of Drupal 10 in composer.json file.