drupal-project
drupal-project copied to clipboard
Upgrade instructions to Drupal 9 for existing projects
I'm trying to upgrade to Drupal 9.0.0-rc1. But I run into errors such as:
- Installation request for symfony-cmf/routing (locked at 1.4.1) -> satisfiable by symfony-cmf/routing[1.4.1].
Should all these packages be required at 9.0.0-rc1?
"drupal/core": "^8.8.0",
"drupal/core-composer-scaffold": "^8.8.0",
"drupal/core-dev": "^8.8.0"
Or is that the wrong approach? Could be a nice instruction to have in the readme maybe.
FYI, I've had this issue as well on my live stream: https://github.com/geerlingguy/drupal-for-kubernetes/issues/29
I think I figured something out. I followed https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-higher, but had to add drupal/core
:
composer require drupal/core-recommended:^9.0.0 drupal/core-composer-scaffold:^9.0.0 drupal/core:^9.0.0 --update-with-dependencies --no-update
composer require drupal/core-dev:^9.0.0 --dev --update-with-dependencies --no-update
composer update
Then it upgraded without errors. But maybe drupal/core
should be removed now that drupal/core-recommended
is present?
Removing drupal/core
seems to work.
Hi, did you find the best solution ?
What seems to work is:
composer require drupal/core-recommended:^9.0.0 drupal/core-composer-scaffold:^9.0.0 drupal/core:^9.0.0 --update-with-dependencies --no-update
composer require drupal/core-dev:^9.0.0 --dev --update-with-dependencies --no-update
composer update
composer remove drupal/core
Only tested locally, but that seems to work fine. And keeps all the good parts of this project :)