Skip to content

ubc-web-services/wstools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update Drupal 10.5 -> Drupal 11.2

Audit

  1. Add audit.sh to your repo root
  2. Run sh audit.sh to exectute the script
  3. The script will output a list of:
    • services from the .platform/services.yaml file
    • php version from the .platform.app.yaml file
    • a list of custom modules contained in web/modules/custom
    • composer dependencies not included in the boilerplate
    • patches in the composer file
  4. The results will also be written to a project_summary.md file in the project root.

Update

Preparation DDEV (Preferred)

  1. Add ddev to the project ddev config (defaults are fine)
  2. Run composer install to pull in current dependencies
  3. Add the scripts in the ddev-web-commands directory to .ddev/commands/web/
  4. Start the site with ddev start
  5. Import the db with ddev import-db < [databasename]
  6. Flush caches ddev drush cr
  7. Run script with ddev d11prepare

Preparation (Lando)

  1. Run composer install to pull in current dependencies
  2. Add the script d11prepare.sh to the root project directory
  3. Start site with lando start
  4. Import the db with lando db-import [databasename]
  5. Flush caches lando drush cr
  6. Run script in root sh d11prepare.sh

Script operations

The script will first ask whether the site is based on a VPR, Science or other boilerplate. It then attempts to make the following updates

Modules updated

  • Drush
  • Webform (+adds patch - not needed once https://www.drupal.org/project/webform/issues/3526888 is in a release)
  • File Delete
  • Formtips (needs to straddle versions: ^1.11||^2.0)
  • Gin (needs to straddle versions: ^4.1||^5.0)
  • Gin Toolbar (needs to straddle versions: ^2.1||^3.0)
  • Image Widget Crop
  • Linkit
  • Linkit Media Library
  • UBC Portfolio modules (does not include CWL or custom modules)
  • UBC Recipes

Additional updates

  • Add and install the Upgrade Status module (if needed)
  • Update the core version requirement to VPR and Science portfolio child themes
  • Prompt you to add the core version requirement if you're using a custom theme
  • alter the recipe location to the root directory
  • alter the .gitignore to remove /web/recipes/ and add /recipes/

Cleanup

You should see a large number of recipes files in /web/recipes/ - these should not be committed and can be safely discarded.

Next Steps

  1. Review and resolve the issues on the Upgrade Status page
  • /admin/reports/upgrade-status
  • Note that formtips will show as having an Incompatible local version, but that can be disregarded since we are straddling required versions. The updated version will be pulled in when core is updated.
  1. Backup work
  • Run database updates to ensure the latest changes are in place. ddev drush updb OR lando drush updb
  • Export database in case you want to roll back. ddev export-db --file=db.sql.gz OR lando db-export
  1. Run Update: also see Official Docs
  • Update permissions.
chmod 777 web/sites/default
chmod 666 web/sites/default/*settings.php
chmod 666 web/sites/default/*services.yml
  • Change core without updating.
composer require 'drupal/core-recommended:^11' \
'drupal/core-composer-scaffold:^11' \
'drupal/core-project-message:^11' --no-update
  • Perform the update dry-run composer update --dry-run
  • If no errors, perform the update composer update
  • Run database updates again. lando drush updb
  • Reinstate permissions (optional on local)
chmod 777 web/sites/default
chmod 666 web/sites/default/*settings.php
chmod 666 web/sites/default/*services.yml
  1. Commit all changes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published