πŸ‡ΊπŸ‡ΈUnited States @benjamindamron

Account created on 3 June 2011, almost 14 years ago
  • Senior Drupal Developer at AgileanaΒ  …
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States benjamindamron

back up your existing drupal 9 composer.json

1. delete core/ and vendor/ directories. in my case, they are at, "web/core," and, "vendor," in the topmost directory.

2. delete composer.lock

3. run the new composer.json for drupal 10.

grab it from the .zip here:  https://www.drupal.org/project/drupal/releases/10.0.0 β†’ . Make sure to edit, "installer-paths," and, "locations" to match where your current code lives. My web-root is, "web." so My composer file would look like this:

"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "./web"
}
},
"installer-paths": {
"web/core": [
"type:drupal-core"
],

"web/libraries/{$name}": [
"type:drupal-library"
],

4. after the initial composer install, run composer require for each of your modules in your backed up composer file. Don't add a version constraint:

composer require drupal/admin_toolbar -W

You may see some errors and you will have to address them as they come up.

good luck!

πŸ‡ΊπŸ‡ΈUnited States benjamindamron

but I just replaced my composer.json with a vanilla drupal 10 composer.json.

I deleted the core and vendor directories and ran composer install.
I then composer required each of the modules I needed. You can string them together in a single command:

composer require drupal/project1 drupal/project2 drupal/project3 -W

Use the "-W," to include all the dependencies. Don't use a version constraint so it will just grab the version you need. 

Run drush updb

This is a drastic approach but if you don't mind rolling through your site and looking for things that might be broken it will at least get you to Drupal 10.

Production build 0.71.5 2024