Static Analysis for your Drupal module

Session Details

While writing a module, we often tend to miss out several things. Undefined variables, type hinting, using Dependency injection instead of calling services, etc. These may often generate several notices and warnings in the database log. Apart from catching the notices and warnings adhering to coding standards and avoiding usage of deprecated methods needs to be also taken care of while writing a module.

In this session, I will follow through the tools necessary to do static analysis of your code which will help to build you to build a module with quality code which is notice free and following latest parameters. We will also briefly see how to integrate these various tools as a part of your Continuous Integration process.

The session will cover:

  # What is Static analysis?
  # Following coding standards using PHPCS and Coder
  # Static analysis using phpstan-drupal
  # Static Analysis of your JS and CSS using ESlint and stylelint
  # Nipping things in the bud using GrumPHP
  # Integrating these tools as part of your CI process


Session Track
Experience Level