The official launch of Drupal 9 was this past Wednesday June 3rd, with it, a new step in the evolution of this CMS was made. This new version doesn't bring new features, but the updates it has are really visible for Drupal developers because now it offers a more secure system with updated dependencies and an API easier to work with
With Drupal 9 here, it is impossible not to talk about those sites which are still using Drupal 7, now we're two versions ahead of it and, for a couple of months, it has been well known that the end of life of it will be in december 2021, that means 18 months from now approximately. During this time, Drupal 7 will still receive security and bug fixes support, though the recommendation in general is to use this time for migrating to Drupal 8 or 9.
The migration from Drupal 7 to 8 or 9 is considered to be the last big jump that should be made, it is like this because when Drupal changed from 7 to 8 a complete rebuild was made, that means, a whole new branch was created for Drupal 8 and it was developed over there, completely independent from Drupal 7.
To execute the Drupal migration from 7 to 8 or 9, it is recommended to use Upgrade Status, Drupal Module Upgrader and Migrate Suite:
- Upgrade status: this is a module that allows us to know the state of our contrib modules and themes, it helps us know if there are already compatible version with D8/9 or if there is any module that may replace the respective functionality.
- Drupal module upgrader: it is a module that generates changes in our custom modules to make them D8 and D9 compatible.
- Migrate suite: this is part of Drupal core and it lets us execute the content migrations.
The migration processes from a major Drupal version to another are usually large, expensive and complex, the change from Drupal 7 to 8 doesn't escape from this, though, from now and on these kind of changes will not be like that, because a new innovation process that eliminates a big part of that complexity has been put in place, and that's the main feature of this Drupal 9 launch.
Image taken from @gaborhojtsy slides
As previously stated, the change from Drupal 7 to 8 was a complete rebuild so a new branch was created and D8 was developed there. Starting with D9 that's different because now every new version will be built on top of the previous one, so it will deliver the same features with new stuff, it will be build over preexisting stuff.
This new innovation process in Drupal is made thanks to three points:
- semantic versioning: it allows to differentiate the launch of new features from those in which there are only bug fixes, this makes it easy to add new features and improvements to the API keeping backwards compatibility,
- scheduled launches: the launch cycle from Drupal has changed, now new features are going to be released every six months, with this new value is delivered to users and feedback is received quicker,
- experimental projects: they allow users to access unfinished features in advance, this is in order for them to provide feedback quickly and to adjust the direction taken in each project.
You may ask, if this is the current state and the first release of D9 doesn't have any different feature than Drupal 8.9.0, then why to launch D9? Well, this is basically because D9 comes with all its dependencies updated, so it includes Symfony 4, Twig 2, CKEditor 4 and the use of JQuery UI is completely remove from the API. Another of the changes that includes the D9 launch is that all deprecated code from D8 has been removed.
Image taken from @gaborhojtsy slides
If this is not a good enough reason to migrate, we have the Drupal 8 end of life date being the same as the one for D7, that means december 2021, which is when Symfony 3 ends its life too, that's why from now and until then D8 will just have security and bug fixing support.
How do we move to D9 if we're already on D8?
Dries Buytaert mentions "The big deal about Drupal 9 is… that it should not be a big deal", that means that D9 shouldn't actually be a big problem, the migration shouldn't be as complex as with previous updates and also should be smooth and pretty straightforward, only stuff needed is to:
- make sure our environment is D9 compatible, that means to confirm we have PHP 7.3, Drush 10 and MySql 5.7.8,
- have D8 core completely updated,
- update our contrib themes and modules to their D9 compatible versions,
- delete from our custom code the use of API deprecated functions, and
- finally, update Drupal core to version 9.
Before, I mentioned the Upgrade Status module as a tool to get prepared for the migration from D7 to 8/9, but on its D8 version it also allows us to see the state of our modules and know if they are D9 compatible. Another useful tool in the D8 to 9 transition is the module drupal rector, this automates the creation of D9 compatible code. Finally, another recommendation is that once we have all our code updated and D9 compatible, we should run our automated tests against D9.
In previous updates, one of the biggest worries of the users has been when are the modules going to be available for the new version, so for the launch of D9 the community started working on this with months of anticipation, in fact this year there were a couple of massive events in which users gathered to work together porting modules, the first of these events was held on april 28 and the second was on may 22 and 23. As a result of these efforts, in the launch day there were already 95% of the top 100 projects were completely D9 compatible.
Image taken from Acquia Deprecation Status page
New features are going to be released each six months, for example the Olivero theme will be released in december and work on Claro as an administration theme is being made. More information about Drupal 9 can be found here.
I highly recommend taking a look at the slides from @gaborhojtsy for more information, they are pretty clear and have lots of links to other related resources, also, they were used by the community in multiple D9 launch celebrations around the world this week.
Thanks for reading!