Skip to main content
Drupal 10 readiness

What's new in Drupal 10?

  1. Symfony 6
    Directly jumping to Symfony 6 means Drupal can provide Symfony security upgrades for longer that if we used Symfony 5 before it reaching EOL.
  2. Olivero and Claro. 
    Olivero is what this theme on this website
  3. Slowling but deliberately killing jQuery!
  4. Ckeditor 5
  5. More stability to existing APIs and removing deprecated code

How to prepare to upgrade/migrate to Drupal 10?

To help the community (and myself), I've upgraded my website from Drupal 9 to Drupal 10. Yes, you heard right, this website is the bleeding edge Drupal! Don't cut yourself while browsing. :) 

Drupal 10 status report

I'll share the steps I went through to do this and my findings. 

  1. First, upgrade your existing site to the latest Drupal 9 version as well as any required modules. This makes it easier to support latest versions of that module which can support the automated D10 compatibility patch. 
  2. Upgrade to PHP 8.1. This is quite easy as Drupal 9 is compatible with PHP 8.1. Just do it already.
  3. Then apply the Drupal 10 compatibility patch, either automated or user contributed to the modules that are enabled. This will probably require that you contribute some patches yourself. I contributed 5 patches in pursuit of this. Open source FTW! The following are the patches I needed before I started.
    {
      "drupal/pwa": {
        "Drupal 10": "https://git.drupalcode.org/project/pwa/-/merge_requests/27.diff"
      },
      "drupal/admin_toolbar": {
        "Drupal 10": "https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/37.diff"
      },
      "drupal/webform": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-11-18/webform-d10-compatibility-3262067-19.patch",
        "Error: Call to undefined method Drupal\\Core\\Extension\\ModuleHandler::getImplementations() in webform_library_info_alter() ": "https://www.drupal.org/files/issues/2022-07-14/webform-getImplementations-3296057-5.patch"
      },
      "drupal/addtoany": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-09-15/addtoany-drupal_10_compat-3296529-5.patch"
      },
      "drupal/ckeditor_font": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-10-10/3239667-elements-metadata.patch"
      },
      "drupal/ckeditorheight": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-07-22/ckeditorheight.1.x-dev.rector.patch"
      },
      "drupal/ckeditor_lineheight": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-07-18/ckeditor_lineheight.1.x-dev.rector.patch"
      },
      "drupal/colordialog": {
        "Drupal 10": "https://git.drupalcode.org/project/colordialog/-/merge_requests/1.diff"
      },
      "drupal/config_ignore": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-08-16/3286656-10.patch"
      },
      "drupal/disqus": {
        "Drupal 10": "https://git.drupalcode.org/project/disqus/-/merge_requests/6.diff"
      },
      "drupal/dopup": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-06-15/dopup.1.0.3.rector.patch"
      },
      "drupal/google_tag": {
        "Drupal 10": "https://git.drupalcode.org/project/google_tag/-/merge_requests/14.diff"
      },
      "drupal/login_security": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-08-22/login_security.2.x-dev.rector.patch"
      },
      "drupal/pathologic": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-09-12/3289033-drupal-10-compatibilities-11.patch"
      },
      "drupal/s3fs": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-08-04/s3fs-d10_readiness-3289442-8.patch"
      },
      "drupal/secure_domain_login": {
        "Drupal 10": "https://www.drupal.org/files/issues/2022-07-23/secure_domain_login.1.0.2.rector.patch"
      },
      "drupal/yoast_seo": {
        "Drupal 10": "https://git.drupalcode.org/project/yoast_seo/-/merge_requests/11.diff"
      },
      "drupal/s3fs_cors": {
        "Drupal 10": "https://git.drupalcode.org/project/s3fs_cors/-/merge_requests/22.diff"
      },
      "drupal/media_gallery": {
        "Add accessCheck()": "https://git.drupalcode.org/project/media_gallery/-/merge_requests/2.diff"
      }
    }
  4. Now run composer install and see if all patches are applied.
  5. Now we are ready to install Drupal 10.0.0-rc1 or whichever is the latest version right now. We still cannot use composer require to install it because most patches for D10 compatibility are not merged yet. So you'll have to alias Drupal 9 as Drupal 10 in composer and then run composer update -W
    "drupal/core": "10.0.0-rc1 as 9.4.8",
    "drupal/core-recommended": "10.0.0-rc1 as 9.4.8",
    "drupal/core-composer-scaffold": "10.0.0-rc1 as 9.4.8",
    "drupal/core-project-message": "10.0.0-rc1 as 9.4.8",

    You may face some conflicts for devel module with symfony vardumper or such packages which requires symfony 5; You can manually add these to your composer.json directly. Or better yet, remove devel. You don't need it. Use Xdebug and/or dump()!

    "symfony/dom-crawler": "^6",
    "symfony/var-dumper": "^6",
  6. Running composer update -W should now download the right versions for everything.
  7. Run drush updb. If there are any incompatible modules, now is the time you'll see it. Before proceeding with updb, please make sure patches are applied for those modules as well. You'll also see errors for bartik, rdf and any other such deprecated modules, themes that are in use. Make sure to uninstall them before proceeding. 
  8. The drush updb command will update required config values also, so export your configs once updb is done.
  9. Clear cache and check all your pages, fix any issues that you might find. I cannot promise it will be perfect, but it will be workable and anything you find please fix and contribute as I have.

Key Findings

  1. You are atleast 30% more cooler than devs who haven't migrated their sites to Drupal 10.
  2. Drupal 10 compatibility patches have made good progress and many modules already support Drupal 10.
  3. The new themes (Claro and Olivero) are really clean and posh. 
  4. The upgrade path from Drupal 9 is extremely simple, especially for those sites that are proactively updating contib modules as and when they are made available.
  5. Our devs from QED42 actually contributed to a lot of the patches I am using in the above list.

 

 

 

x

Work

Therefore logo
80 Atlantic Ave, Toronto, ON Canada
Email: hello@therefore.ca
Call us: +1 4166405376
Linkedin

Let us know how we can help!