Install

Works with Drupal: ^10.1 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 57.3 KB
MD5: 62340dc121361d157cf4229355ff8f67
SHA-1: 909ed0112b8c5d9e8a2c04ec35877f89032766e0
SHA-256: 8e9006d71434111a150d94adff15250d5eb57023f1a2db8687836a9a33fac8b9
Download zip 105.13 KB
MD5: a4316b3c93fa6047d67c718017e8157b
SHA-1: c2f5e981015021929e79f88e2dba113e46e2717c
SHA-256: 73f13d343203abd66fae1011cb5715b2553f13d232a82cf1386bc7f219dc9fee

Release notes

Adds Drupal 12 support and converts the hook implementations to the current core APIs. No backwards compatibility breaks.

Drupal 12 compatibility

  • Drupal 12 support. The module installs and runs on Drupal 12. Verified against Drupal 10.6.15, 11.4.5 and 12.0-dev, with the full test suite of 118 tests passing on all three, and with a live Varnish in front of Drupal 12.
  • Hook implementations converted to classes. The hooks now live in src/Hook/ using the #[Hook] attribute, which Drupal 12 requires. The procedural implementations in adv_varnish.module are kept behind #[LegacyHook] and delegate to those classes, so behaviour is unchanged on Drupal 10 and 11.
  • hook_requirements() converted. The BigPipe conflict check is now implemented as hook_runtime_requirements(), and the procedural version is marked #[LegacyRequirementsHook]. Without this the check would stop working in Drupal 13.
  • Requirement severity. REQUIREMENT_ERROR is replaced with RequirementSeverity::Error through DeprecationHelper, so both constants work on the core version that has them.

Based on the Project Update Bot patch in #3595161: Automated Drupal 12 compatibility fixes for adv_varnish 4.0.15.

Changed requirements

The minimum core version is now Drupal 10.1. core_version_requirement changed from ^9 || ^10 || ^11 to ^10.1 || ^11 || ^12. Only unsupported core versions were dropped: Drupal 9 reached end of life in November 2023, and Drupal 10.0 is no longer supported either. Every supported Drupal 10 and 11 release keeps working. The new lower bound is 10.1 because DeprecationHelper was introduced there.

Bug fixes

  • A deprecation was emitted on every request on Drupal 10.3 and later. The event subscriber decided how to call its parent constructor based on Drupal 11.0, but the time service became a constructor argument of FinishResponseSubscriber in Drupal 10.3. On 10.3 through 10.6 the debug headers flag was passed into the time argument instead. The version boundary is corrected.
  • Varnish server addresses without a scheme caused Guzzle exceptions. Addresses configured without http:// or https:// now get the scheme prepended before the request is made, which Guzzle 7.11 started rejecting.

Code quality

  • The hook classes use dependency injection instead of static \Drupal:: calls, and the hook services are declared with explicit arguments so that the container builds identically on every supported core version.
  • hook_entity_type_alter() and hook_theme() live in a separate dependency free class. Both run while entity type and theme definitions are still being built, so a hook class with injected services would produce a circular service reference.
  • Unit tests use test stubs where no expectations are configured.
  • PHPStan, PHPCS, CSpell and ESLint all pass with no findings, on all three supported core versions.

Backwards compatibility

This release contains no backwards compatibility breaks.

  • No public method signature changed. The missing return type deprecations reported by Drupal 12 are suppressed with @return annotations rather than native types, so classes such as CacheBlockForm and UserBlockBase can still be extended by subclasses that do not declare a return type.
  • The procedural hook implementations in adv_varnish.module are still in place.
  • ClearCacheForm::$cacheManager changed from private to protected, which only widens access.
Created by: shumer
Created on: 8 Aug 2026 at 22:47 UTC
Last updated: 8 Aug 2026 at 22:48 UTC

Other releases