![Page 1: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/1.jpg)
![Page 2: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/2.jpg)
Let’s get ready
alexpott
Drupal 9 is coming
![Page 3: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/3.jpg)
ABOUT ME➤ Contributing to Drupal for >9 years ➤ Drupal 8 core-committer ➤ Testing subsystem maintainer
➤ Consulting at Acro Media and Thunder ➤ alexpott on the internet
![Page 4: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/4.jpg)
➤ When Drupal 9 will be released ➤ Technical debt ➤ Using Drupal’s deprecation policy
➤ Detecting deprecations ➤ How to deprecate code ➤ Other recommendations for getting ready for Drupal 9
WHAT THE TALK IS ABOUT
![Page 5: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/5.jpg)
DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021
![Page 6: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/6.jpg)
TECHNICAL DEBT
➤ When software changes you accumulate technical debt ➤ Drupal 8 made a lot of changes very fast. ➤ Therefore introduced a lot of technical debt
![Page 7: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/7.jpg)
“Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite…
Ward Cunningham, 1992
![Page 8: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/8.jpg)
“The danger occurs when the debt is not repaid. Every minute spent on not-quite-right code counts as interest on that debt. Entire engineering organizations can be brought to a stand-still
Ward Cunningham, 1992
![Page 9: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/9.jpg)
DRUPAL’S DEPRECATION POLICY
➤ Deprecated code must trigger a silenced E_USER_DEPRECATION error.
➤ Deprecated functions and methods must have an @deprecated PHPdoc tag
➤ Deprecations must have a change record
➤ Deprecated code should not be used during regular runtime
➤ All code deprecated will be removed in Drupal 9
![Page 10: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/10.jpg)
![Page 11: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/11.jpg)
DETECTING DEPRECATIONS
![Page 12: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/12.jpg)
![Page 13: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/13.jpg)
➤ IDE support. For example, PHPStorm will cross out any usage of deprecated code.
➤ Static analysis tools like @mglaman’s drupal-check
➤ Future support in the Devel module via the Symfony debug toolbar
➤ Using Symfony’s PHPUnit Bridge during automated testing
DETECTING DEPRECATIONS
![Page 14: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/14.jpg)
![Page 15: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/15.jpg)
LIVE CODING
![Page 16: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/16.jpg)
➤ Add @deprecation PHPdoc tag - the format of this is about to change - https://www.drupal.org/project/coding_standards/issues/3024461
➤ Add @trigger_error ➤ Use @group legacy
➤ Use @expectedDeprecation ➤ Straight replacement is not always the way to go
LIVE CODING SUMMARY
![Page 17: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/17.jpg)
ADVANCED CASES
➤ Dynamic deprecation messages can use the ExpectedDeprecationTrait to make testing easier
➤ Method parameters, return values, Drupal hooks, code paths and plugins all have special forms of deprecation
➤ For more see https://www.drupal.org/core/deprecation
![Page 18: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/18.jpg)
CONTRIBUTED/CUSTOM MODULES AND YOUR CODEBASE➤ Use @mglaman’s drupal-check
➤ Using @trigger_error testing is tricky at the moment
➤ Run tests locally or your own CI
➤ Target the minimum version of Drupal core you want to support.
➤ Deprecation testing can be disabled
➤ Run-tests.sh: —suppress-deprecations
➤ Env var: SYMFONY_DEPRECATIONS_HELPER
➤ See https://www.drupal.org/node/3002148
➤ See https://github.com/mglaman/drupal-check/wiki/Drupal-9-Readiness
![Page 19: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/19.jpg)
OTHER RECOMMENDATIONS
➤ Test against multiple PHP versions ➤ (Once it is possible) Test against multiple dependency
versions ➤ Create Drupal 8 migration sources and destinations
➤ Try not to mix refactoring with functional change ➤ Be very very careful with sub-classes and overriding
constructors
![Page 20: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/20.jpg)
![Page 21: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/21.jpg)
Inspired by @larowlan and @drunken_monkey
![Page 22: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/22.jpg)
➤ Drupal 9 will be released in 2020 ➤ Use Drupal’s deprecation policy to deprecate code ➤ Test for deprecate code usage
➤ Jump in and help core and contrib to get ready ➤ https://www.drupal.org/project/drupal/issues/2959269 ➤ https://www.drupal.org/project/issues/search?
issue_tags_op=all+of&issue_tags=Drupal+9+compatibility
➤ #d9readiness in slack
IN SUMMARY
![Page 23: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/23.jpg)
THANKS
➤ Symfony for the idea of using @trigger_error() and PHPUnit Bridge component
➤ DrupalCI maintainers @mixlogic and @mile23 ➤ @mglaman for drupal-check
➤ @Gábor Hojtsy for all Drupal 9 readiness coordination work
➤ The many contributors ➤ Dries Buytaert for the Drupal release date images
![Page 24: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/24.jpg)
Sorry for all the 8.6.x releases
![Page 25: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/25.jpg)
Thank you
![Page 26: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/26.jpg)
Join us forcontribution opportunities
Friday, April 12, 2019
Mentored Contributions
9:00-18:00Room: 602
First Time Contributor Workshop
GeneralContributions
9:00-12:00Room: 606
9:00-18:00Room: 6A
#DrupalContributions
![Page 27: Let’s get ready · Other recommendations for getting ready for Drupal 9 WHAT THE TALK IS ABOUT. DRUPAL 8 WILL BE END-OF-LIFE BY NOVEMBER 2021. TECHNICAL DEBT When software changes](https://reader035.vdocument.in/reader035/viewer/2022062921/5f02efa17e708231d406be4e/html5/thumbnails/27.jpg)
What did you think?
Locate this session at the DrupalCon Seattle website:https://events.drupal.org/seattle2019/sessions/drupal-9-coming-getting-your-code-ready
Take the Survey!https://www.surveymonkey.com/r/DrupalConSeattle