Still more to contribute to Drupal 8

01/08/2015 - 14:05 -- Peter Bull - Acquia

[Note from the OwnSourcing editorial team: This article was written by Peter Bull from Acquia. Visit for more about Pete.]

The Drupal Global Sprint Weekend is not specifically focused on Drupal core. As Drupal 8 becomes more polished, there's plenty to be done in the world of contributed modules. Helping to port a module to D8 is a great way to get involved while learning what's new.

Why Contrib?

Historically, when a new major version of Drupal is released, it has taken a while for contrib modules to catch up with stable releases. This can cause delays in building and launching new Drupal 8 sites. Now that D8 is in beta (8.0.0-beta4 was released on December 17!) and the APIs are pretty stable, it's a perfect time to work on porting existing modules to D8. It's also a good way to learn about some of the changes in Drupal development.

Find a Project

You can search the Modules page on for active projects with existing D8 releases. From there, you can browse the issue queue for any project, and filter on the version field to view only the 8.x issues.

If the issue queue contains bug reports, try installing the module and replicating the bug. If there is a proposed patch that addresses the issue, review the patch to see if it fixes the bug. Post back to the issue queue to confirm whether you are able to replicate or not, or whether you require more information in order to replicate. If you are testing a patch be sure to report whether it resolves the bug.

Change Records

Any API changes in Drupal 8 that break backwards compatibility now require documentation of in the form of a change record. These change records can serve as detailed and focused how-tos for you to upgrade your skills and get started with what's new/different in Drupal 8.

For example, consider hook_permission() in Drupal 7, which is used to define user permissions. You might be surprised to discover that this hook is absent from Drupal 8, but a quick search of the change records returns documentation on how permissions are now implemented in YAML files:

There are even code examples, where applicable, to help you update your Drupal 8 code:

Drupal 7

// in views. module file.

function views_permission() {
$permissions = array(
'access all views' => array(
'title' => t('Bypass views access control'),
'description' => t('Bypass access control when accessing views.'),

return $permissions;

Drupal 8

# In views.permissions.yml file.
access all views:
title: 'Bypass views access control'
description: 'Bypass access control when accessing views.'
restrict access: TRUE

Drupal Module Upgrader

The Drupal Module Upgrader is a set of drush commands that can serve to simplify the process of upgrading a module from Drupal 7 to Drupal 8. If you are just starting to port an existing module to D8, you should definitely check out this project.

The Drupal Module Upgrader provides two helpful commands:

  • The drush dmu-analyze command will scan the files in a Drupal 7 module and flag code that needs to be updated, with links to documentation of relevant API changes. This output is saved to a static HTML file for easy reference.
  • The drush dmu-upgrade command will actually attempt to automate the process of upgrading a Drupal 7 module to Drupal 8. Although this process is by no means comprehensive and you're unlikely to produce a fully-functioning module just by running it through this tool, it reduces some of the tedium of rewriting the code, and also provides helpful inline comments for code that needs more thorough inspection.

When upgrading existing modules, especially when running drush dmu-upgrade, remember to Git clone the repo locally so you can easily diff your code to see what's been changed.

D7 Contrib

There's no better time to get acquainted with Drupal 8 than at a sprint, where you have other Drupalists available to answer questions and bounce ideas off of. However, if there's an existing D7 project that interests you, this is also an opportunity to work on D7 contrib as well.

Remember, the Drupal Global Sprint 2015 - New England is on Saturday, January 17 from 10am to 5pm. RSVP now to join us at Genuine in Boston.