If you work on a Drupal site as a developer, run drupal-check. There are a few ways to check if your site is using deprecated code. How do I know if my site uses deprecated code? If you're interested, you can read more about Drupal's deprecation policy at. Any Drupal 8 module that uses deprecated code needs to be updated before Drupal 9 is released, or it will stop working with Drupal 9.Any Drupal 8 module that does not use deprecated code will continue to work with Drupal 9.In our example, this means that \Drupal::l() will not be available anymore in Drupal 9. When we release Drupal 9, we will "drop" most deprecated code. Interview drupal dries buytaert api javascriptanderson update#This gives module maintainers ample time to update their code. For example, \Drupal::l() continues to work in Drupal 8.7 despite the fact that it was deprecated in Drupal 8.0.0 more than three years ago. The \Drupal::l() function was marked for removal as part of some clean-up work Drupal 8 had too many ways to generate links.ĭeprecated code will continue to work for some time before it gets removed. Instead of using \Drupal::l(), you should use Link::fromTextAndUrl($text, $url). Typically, code is deprecated because there is a better alternative that should be used instead.įor example, in Drupal 8.0.0, we deprecated \Drupal::l($text, $url). What is deprecated code?Ĭode in Drupal is marked as "deprecated" when it should no longer be used. In fact, it should be as easy as a minor version upgrade (like upgrading from Drupal 8.6 to Drupal 8.7). If your site doesn't use deprecated code that is scheduled for removal in Drupal 9, your upgrade to Drupal 9 will be easy. The only caveat is that you need to manage "deprecated code" well. The good and important news is that upgrading from Drupal 8 to Drupal 9 should be really easy - radically easier than upgrading from Drupal 7 to Drupal 8. With Drupal 9 targeted to be released in June of 2020, many people are wondering what they need to do to prepare.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |