Start testing your contrib and client projects on Drupal 8.4.x now!
Share:
Drupal 8.4.0 comes out in October, and at that time 8.3.x will be end-of-life (EOL).
There are two major vendor updates in 8.4.0 so the time to test your contrib and client projects is now.
In this post we talk about the coming changes and how to test your client and contrib projects.
by
Lee Rowlands
/ 25 September 2017
The two major vendor updates in Drupal 8.4.0 are as follows:
You can start testing now by updating to Drupal 8.4.0-rc2.
Symfony 3.x
If your project interacts Symfony directly at the lower level (rather than using Drupal core APIs that in turn use Symfony), you should be sure to review your code to make sure you're not using any of the APIs impacted by the BC breaks between 2.x and 3.x. Hopefully, your automated testing will reveal these regressions for you (you have automated testing right?). See the Symfony change list for the details of BC breaks.
One thing to note with the Symfony update is that whilst core dependencies were updated, your project may rely on other third-party PHP libraries that have dependencies on Symfony 2.x components. This may cause you issues with your update - and require you to update other dependencies at the same time - including drush - so testing sooner rather than later is recommended. If you find you're having issues with composer dependencies, we have another blog post dedicated to debugging them.
jQuery 3.x
While it's most likely that you'll have automated tests to catch any issues with the Symfony upgrade, it's less likely that you'll have test coverage for the jQuery update, as JavaScript test coverage is typically low in Drupal projects, particularly in contrib modules.
Of note in the jQuery update are several BC breaks - listed here http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/ and http://jquery.com/upgrade-guide/3.0/. This may have a major impact on contrib projects that are heavy on JavaScript - and your client project code if you have a large amount of custom JavaScript, both in modules and your theme.
Of particular interest
- .load removed
- .unload removed
- .error removed
- .bind deprecated (use .on)
- .delegate deprecated
- .on('ready', function() {}) removed
- jQuery('#') and .find('#') throw invalid syntax errors
- .andSelf() removed (use .addBack())
A recommended approach to auditing and tackling this is to add the jQuery migrate plugin to your project, and begin testing whilst watching the JavaScript console to detect deprecation notices thrown from the plugin.
Finally, if you are reading this and thinking, I really need to add some test coverage to my project, one of our team Sam Becker is presenting on all things testing at Drupalcon Vienna this week. If you can't wait that long, check out his session from the last Drupal South.
Tagged
Testing, Drupal 8, Composer, jQuery
Posted by
Lee Rowlands
Senior Drupal Developer
Dated 25 September 2017
Add new comment