Rewriting outdated code sometimes requires going through issue queue comments and doing some research to figure out how the core module has been reconfigured. There is an active issue in the Drupal core issue queue for this deprecation. Use \Drupal\Core\Pager\PagerManagerInterface->defaultInitialize() instead. Some deprecations are more involved and do require some code rewrites if your custom modules are relying on the outdated code.Ĭall to deprecated function pager defaultinitialize() in drupal:8.8.0 and is removed from drupal:9.0.0. You can see a patch that has been created that swaps out url() with toUrl() straightforwardly: - $menuItem = file_url_transform_relative($imageFile->Url()) $menuItem = file_url_transform_relative($imageFile->toUrl()->toString()) Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Some deprecations call for easy swap-outs, like the example below:Ĭall to deprecated method url() of class Drupal\file\Entity\File. A lot of functions, constants, and classes in Drupal core have been deprecated in Drupal 9. There are some comprehensive guides available on that highlight the steps needed for Drupal 9 readiness. How can you assess what is needed to upgrade? We might see automatic updates for 9.1, or drush included in core. The list of Strategic Initiatives gives a detailed overview of major undertakings that have been completed for Drupal 8 or are proposed and underway for Drupal 9. 6 Month release scheduleĪlong the lines of how Drupal 8 releases worked, Drupal 9.1.0, 9.2.0, and so on, will each contain new backwards-compatible features for Drupal 9 every six months after the initial Drupal 9.0 release. ![]() If you have an existing test suite using PHPUnit, you might have to replace a lot of deprecated code, just as you will do for custom modules. The Simpletest API will be deprecated in Drupal 9 and PHPUnit is recommended in its place. ![]() PHPUnit 6 -> 7įor testing, PHPUnit 7 will be used instead of version 6. Drupal 9 will still depend on jQuery, but most components of jQuery UI will be removed from core. CKEditor 5 is planned to be used for a future version of Drupal 9 this issue references 9.1.x for the transition. Twig 1 -> 2ĭrupal 9 will use Twig 2 instead of Twig 1 (Drupal 8). ![]() Drupal 8 relies on Symfony 3, and to ensure security support, Symfony will have to be updated for Drupal 9. The biggest change for third party dependencies is the use of Symfony 4.4 for Drupal 9. The documentation visualizes the differences between Drupal 8.9 and 9 with this image: Drupal 9.0 API = Drupal 8.9 API minus deprecated parts plus third party dependencies updated Upgrades Symfony 3 -> 4.4 Upgrading to Drupal 9 should be like any other minor upgrade, so long as you have removed or replaced all deprecated code. In terms of what the code looks like, Drupal 9 will be the same as the last Drupal 8 minor release (which is set to be 8.9), with deprecated code removed and third-party dependencies updated. This is really good news for companies and organizations who want to port sites before Drupal 8 end of life in November 2021 and who want to avoid or minimize the disruption that can come with a complicated migration. You won’t have to map content types and fields using migration modules or custom migration plugins and you won’t have to restructure your custom modules from scratch. That is a significant departure if you recently went through a Drupal 6 to 7, or Drupal 7 to 8 migration. ![]() Drupal 9ĭrupal 9 is not being built in a different codebase than Drupal 8, so all new features will be backward-compatible. This will help prepare you when it comes time to make the leap and to reassure you that this should be a straightforward and painless process. This article covers what is involved with the 8 to 9 migration, sharing some of the gotchas we encountered in the hopes that you can have a smooth transition.Īre you familiar with what is coming in Drupal 9? How can you assess what is needed? How do you know what code needs to be updated? What other steps are involved? Since we all have migrated our sites from Drupal 7 to 8.9.x already ( right?), it should be a fairly straightforward process to port everything from 8 to 9 when the time comes. The Drupal 8.9.0 release was available the same day, and that means end-of-life for 8.7.x. The first stable release for Drupal 9 shipped right on schedule - June 3, 2020.
0 Comments
Leave a Reply. |