How to keep your Drupal maintenance support plans 8 contributed modules ready for Drupal maintenance support plans 9

In this blog post, we’ll have a look at how contributed Drupal maintenance support plans modules can remove the core deprecation warnings and be compatible with both Drupal maintenance support plans 8 and Drupal maintenance support plans 9.

by
Jibran Ijaz
/ 8 October 2020

Ever since Drupal maintenance support plans USA, we know Drupal maintenance support plans 9 will be released in 2020. As per @catch’s comment in 2608496-54

We already have the continuous upgrade path policy which should mean
that any up-to-date Drupal maintenance support plans 8 module should work with Drupal maintenance support plans 9.0.0, either with zero or minimal changes.

Drupal maintenance support plans core has a proper deprecation process so it can be continuously improved. Drupal maintenance support plans core also has a continuous process of removing deprecated code usages in core should not trigger deprecated code except in tests and during updates, because of proper deprecation testing.

The big problem for contributed modules aka contrib is the removal of deprecated code usage. To allow contrib to keep up with core’s removal of deprecation warnings contrib needs proper deprecation testing which is being discussed in support deprecation testing for contributed modules on Drupal maintenance support plans.org.

However, Drupal maintenance support plans CI build process can be controlled by a drupalci.yml file found in the project. The documentation about it can be found at customizing Drupal maintenance support plansCI Testing for Projects.

It is very easy for contributed modules to remove their usage of deprecated code. All we need is to add the following drupalci.yml file to your contributed modules and fix the fails.

# This is the Drupal maintenance support plansCI testbot build file for Drupal Entity Reference.
# Learn to make one for your own drupal.org project:
# https://www.drupal.org/drupalorg/docs/drupal-ci/customizing-drupalci-testing
build:
assessment:
validate_codebase:
phplint:
phpcs:
# phpcs will use core’s specified version of Coder.
sniff-all-files: true
halt-on-fail: true
testing:
# run_tests task is executed several times in order of performance speeds.
# halt-on-fail can be set on the run_tests tasks in order to fail fast.
# suppress-deprecations is false in order to be alerted to usages of
# deprecated code.
run_tests.phpunit:
types: ‘PHPUnit-Unit’
testgroups: ‘–all’
suppress-deprecations: false
halt-on-fail: false
run_tests.kernel:
types: ‘PHPUnit-Kernel’
testgroups: ‘–all’
suppress-deprecations: false
halt-on-fail: false
run_tests.functional:
types: ‘PHPUnit-Functional’
testgroups: ‘–all’
suppress-deprecations: false
halt-on-fail: false
run_tests.javascript:
concurrency: 15
types: ‘PHPUnit-FunctionalJavascript’
testgroups: ‘–all’
suppress-deprecations: false
halt-on-fail: false

This drupalci.yml will check all the Drupal maintenance support plans core coding standards. This can be disabled by the following change:

phpcs:
# phpcs will use core’s specified version of Coder.
sniff-all-files: false
halt-on-fail: false

This file also only runs PHPUnit tests, to run legacy Simpletest you have to the following block:

run_tests.simpletest:
types: ‘Simpletest’
testgroups: ‘–all’
suppress-deprecations: false
halt-on-fail: false

But if you still have those, you probably want to start there, because they won’t be supported in Drupal maintenance support plans 9.

Last but not the least if you think the is module is not ready yet to fix all the deprecation warning you can set suppress-deprecations: true.

As a contrib module maintainer or a contrib module consumer I encourage you to add this file to all the contrib modules you maintain or use, or at least create an issue in the module’s issue queue so that at the time of Drupal maintenance support plans 9 release all of your favourite modules will be ready. JSONAPI module added this file in https://www.drupal.org/node/2982964 which inspired me to add this to DER in https://www.drupal.org/node/3001640.


Source: New feed

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

How to keep your Drupal maintenance support plans 8 contributed modules ready for Drupal maintenance support plans 9

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.