Twig Coding Standards Job for Contributed Projects Remains Disabled Until Drupal 11.5

Promotional graphic about automated Twig coding standards checks in Drupal. Text reads "Standards and Compliance". "Cleaner Twig Templates Through Automated Checks". "Core CI now catches Twig coding standard issues before review with contributed project support following through Drupal.org GitLab templates". A workflow illustration shows a Twig code file passing through an automated Drupal check and becoming a validated file with a green check mark.

Automated Twig coding-standard checks are ready for Drupal contributed projects, but the GitLab Templates job remains disabled by default until Drupal 11.5 is released. A Drupal Coding Standards issue opened on 21 August 2026 says the implementation has been tested and is ready for broader use once that core release is available. The contrib work follows Drupal core's adoption of vincentlanglet/twig-cs-fixer in July.

Drupal core had no automated Twig coding-standard checker comparable to the tools already used for PHP, JavaScript and CSS. The core issue proposed Twig CS Fixer to close that gap and check templates against Twig coding standards. Core maintainers committed the change to main and 11.x on 21 July 2026, putting it on track for Drupal 12 and Drupal 11.5.

Drupal core's GitLab CI configuration now includes a dedicated Twig coding-standards job. On merge requests, the job runs when Twig templates, the Twig CS Fixer configuration or related Composer files change, and it produces a GitLab Code Quality report. The pipeline also uses core/.twigcsfixercache to preserve linting results between runs.

Twig CS Fixer can report coding-standard violations and automatically fix supported formatting problems. Earlier testing recorded 120 Twig errors in Drupal core before the checker was adopted, requiring existing templates to be brought into compliance. In the core pipeline, the Twig job now sits alongside PHP_CodeSniffer, PHPStan, ESLint and Stylelint rather than replacing those checks.

For contributed projects, a GitLab Templates work item introduced the Twig linting job, while a follow-up issue records that it remains disabled by default and should be enabled when the current core release reaches Drupal 11.5. The Drupal Coding Standards issue describes that implementation as tested and ready. The published GitLab Templates documentation does not yet list Twig among its standard validation jobs.

Drupal 11.5.0-beta1 and Drupal 12.0.0-beta1 are scheduled for the week of 14 September 2026, according to the Drupal core release schedule. Stable Drupal 11.5.0 and Drupal 12.0.0 releases are scheduled for the week of 7 December. Core therefore has automated Twig coding-standard checking ahead of those releases, while default activation for contributed projects remains tied to Drupal 11.5 becoming available.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Upcoming Events