Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Getting ready for Drupal 11

Getting ready for Drupal 11

https://2024.drupaliberia.eu/getting-ready-drupal-11

Drupal 11 will be released this year, which means that we as a community need to start preparing for the near future. This means helping to ensure that Drupal 11 is released on time, but also that modules are ready on release day to support the new version.
This talk will draw on the experiences of having done Drupal 8->9 and then 9->10 site migrations and upgrading contrib and custom modules to the new core version.
The talk will not only focus on the technical steps to perform the upgrade, but also the organizational and human skills needed to support the upgrade.

The slides will be in English, but the language used during the presentation will be chosen by the audience.

João Ventura

May 10, 2024
Tweet

More Decks by João Ventura

Other Decks in Programming

Transcript

  1. drupal.org/u/jcnventura João Ventura Previously: • @1xinternet • @wunder • @trellon

    Now back to 🚀 (no Drupal involved) Co-organizer of DDD Lisbon and Drupal Europe (co-)Maintainer of a few contrib modules Portuguese, living near Darmstadt, Germany, previously lived near Madrid, Spain.
  2. What’s new in Drupal 11 • Nothing! It will be

    the same as Drupal 10.3* • New dependencies ◦ Symfony 7 ◦ jQuery 4 ◦ PHPUnit 10 (testing) • Upgraded requirements ◦ PHP 8.3 🚀 ◦ Composer 2.7 ◦ MariaDB 10.6 or MySQL 8 or PostgreSQL 16 * deprecated modules removed
  3. Upgrade to Drupal 11 ASAP? • Maybe no ◦ Sites

    can wait until LTS ends, and upgrade to next LTS ◦ Major advantage: contrib will be ready for the upgrade. • Maybe yes ◦ New features (and new bugs) ◦ What if everyone waits 2 years before upgrading contrib?
  4. Drupal 11 will be released ~ July 29th 2024 Drupal

    core release cycle Each major will have 2 years of active support + 2 years of LTS
  5. Coming soon ONLY to Drupal 11 • Automatic updates •

    Project browser • Experience Builder • and anything else needed for Starshot
  6. Upgrade strategies • One-off sites • Agency Distribution / starter

    project • Module maintainer Common solution: get Drupal 11 running now, and test Drupal 11.0.0-alpha1 released 1 week ago.
  7. https://dev.acquia.com/drupal11/deprecation_status • Almost 15% already have D11 support • 54%

    only need to add “|| ^11” to .info.yml • Update bot patches for ~6% • ~25% will need more work • Contrib maintainers need to maintain! • Project Update Working Group (🚑) https://www.drupal.org/project/puwg • 25% of D9 projects never got upgraded to D10 before D9 EOL !! Current state of contrib packages
  8. Lenient composer plugin • Drupal 8 to Drupal 9 upgrades

    used the lenient composer endpoint that removed the drupal/core requirement "repositories": { "lenient": {"type": "composer", "url": "https://packages.drupal.org/lenient" } "8": {"type": "composer", "url": "https://packages.drupal.org/8" } }, • Now replaced with the composer-drupal-lenient plugin "require": { "cweagans/composer-patches”: "^1.7”, "mglaman/composer-drupal-lenient": "^1.0" }, Same principle, but drupal/core bypass is now local. i
  9. Lenient composer plugin • allow-list for those modules/themes/profiles that composer

    would refuse to install due to incompatible reqs: "extra": { "drupal-lenient": { "allowed-list": [ "drupal/admin_toolbar", "drupal/token", ]}}, • Easy way to search for those contrib packages: grep -R core_version_requirement web/*/contrib/*/*.info.yml ii
  10. Upgrade bot • Upgrade bot is a a set of

    static analysis tools that analyse the code of all not-yet compatible projects and generates a patch and merge request to remove most code deprecations ◦ Not all deprecations ◦ Now also supports changing the info.yml • Issues can be identified by title “Automated Drupal 11 compatibility fixes for foobar” ◦ Test, review and merge if maintainer ⇢ pass Go
  11. Composer patches plugin • Either created manually or from update

    bot "extra": { "patches": { "drupal/foobar": { "D11": “https://www.drupal.org/files/issues/2024-05-10/123–-4-drupal_11_compatibility.patch” } }}, • Never use a merge request plain text diff to patch!! ⚠⚠ ◦ Major security risk 🚨 ◦ Use commit patch or upload the current state of MR
  12. Drupal rector • Install in require-dev "require-dev": { "palantirnet/drupal-rector”: "^0.20”

    }, • Copy rector.php to project root cp vendor/palantirnet/drupal-rector/rector.php . • Analyse for deprecations vendor/bin/rector process web/modules/custom/[YOUR_MODULE] --dry-run • Apply changes vendor/bin/rector process web/modules/custom/[YOUR_MODULE]
  13. Upgrade status module • Drupal 10 module to check current

    status of used packages • Install also in dev "require-dev": { "drupal/upgrade_status”: "^4.3” }, • See https://www.drupal.org/project/upgrade_status for detailed installation instructions • example.com/admin/reports/upgrade-status FTW!
  14. DDEV • Can’t use PHP 8.3 yet because of… •

    DDEV provides docker-based local development environments • Installation instructions: https://ddev.readthedocs.io/ • Go back in time, and watch Mauricio’s session 2h ago
  15. Developers • Any error in a contrib package should be

    reported in the d.o issue queue ◦ First, check if fix already exists ▪ If merged, and works (!), mark RTBC; done ◦ Create MR, patch commit diff and mark “Needs Review” • Local patch ◦ 0% chance of being merged ◦ Hard to maintain ◦ Effort needed
  16. Maintainers • Regularly check for RTBC issues ◦ Test and

    merge (or ⇢ Needs work) • Check for Upgrade Bot issue ◦ Test, merge and create new D11 release • Provide contribution credits • Create roadmap • Not a maintainer? Maintainer is MIA? ◦ Apply to be a maintainer!
  17. Agencies • Promote open-source culture!! • Provide paid time for

    contrib work ◦ Developer reputation 🤩 ◦ d.o/marketplace credit 🤑 • Co-maintain or sponsor “go-to” packages • Maintain your modules (even if no longer used…) ◦ Don’t reinvent the wheel