Skip to main content
3 of 4
edited body
Hudri
  • 5.2k
  • 3
  • 20
  • 56

You have some really dirty hacks in your composer.json. A line like "drupal/core": "9.2.3 as 8.9.0" is a very bad idea and is always going to explode sooner or later. The intention usually is to upgrade Drupal core v9 while keeping v8-only/v9-incompatible modules, but trying to do something like this is just plain wrong.

  1. Remove all lines drupal/core*** except drupal/core-recommended and drupal/core-composer-scaffold. Those two will require all other stuff, the superfluent drupal/core*** just make future upgrading harder.
  2. In your other post there is the error message ...drupal/theme_switcher 1.1.0 requires drupal/core ^8.5.... This module is incompatible with Drupal v9 (and maybe has been the cause for the very bad idea mentioned in point 1). Luckily there is now a drupal/theme_switcher:^1.2 which is compatible with Drupal v9.
  3. In my experience the most reliable way to update Drupal core is to explicitly require a new minimum version of core-recommended and core-composer-scaffold: composer require drupal/core-recommended:^9.2.4 drupal/core-composer-scaffold:^9.2.4 --update-with-dependencies.
  4. In your special case you also need to update the v8 Theme switcher module to get a full set of v9 compatible packages: composer require drupal/core-recommended:^9.2.4 drupal/core-composer-scaffold:^9.2.4 drupal/theme_switcher:^1.2 --update-with-dependencies
Hudri
  • 5.2k
  • 3
  • 20
  • 56