Install

Works with Drupal: ^11.4 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 111.95 KB
MD5: 0bccd87dc06f33ce7ad05a61d627edd2
SHA-1: 61b1098dd6bd6119afe64b51a2afc421aaa39829
SHA-256: 2475c1d337741629ef932bce6ef6ef4a22436d2d0ddf36bfaae78173bf1f7647
Download zip 172.23 KB
MD5: 0e2946c7dd06a6cdc2cc70953d73080e
SHA-1: 7de8d970519c3307f4c46bf52aac4233485eaee1
SHA-256: 35d41305caffc5676eca20f9c4ef11dc70c80387be19d2b33e63812a34bfc368

Release notes

Fixes a fatal on PHP 8.3, which is inside the supported range. Sites on 11.4 running PHP 8.3 should update.

Fixed

readonly injected services made both settings forms fatal on PHP 8.3. SettingsForm and File Gate Form's FileGateForm declared their injected services readonly. Both extend ConfigFormBase/FormBase, which bring in DependencySerializationTrait, and below PHP 8.4 that trait's __wakeup() cannot reinitialize a readonly property declared in a child class — it is out of the declaring scope. Drupal caches form objects and unserializes them when a form rebuilds, so the grant signer, gate-method manager and entity type manager came back unusable.

PHP 8.3 is inside the supported range: this module declares ^11.4 || ^12, and Drupal 11.4's minimum PHP is 8.3. Ten properties across the two forms were affected.

The gate-method plugins had the same defect in its other form. Their injected services were private, which DependencySerializationTrait also cannot restore — a plugin whose signer or lock comes back unset fails at the point of use rather than the point of the mistake. Widened to protected, with a serialize/unserialize round-trip test covering it.

Thirteen type errors surfaced by the new static analysis. None behavioural, but several papered over a wrong assumption: file_gate_file_download() was untyped; two field-config form handlers called getEntity() on FormInterface, which does not declare it, then called FieldConfig and FieldStorageConfig methods on the EntityInterface that came back. Those handlers now narrow explicitly and return early when the object is not what they expect.

Added

A phpstan.neon.dist, and a PHPStan job in CI. The module shipped neither, so the drupal.org pipeline analysed it with the shared default configuration rather than the level and rule set used elsewhere, and GitHub ran no static analysis at all. That gap is how the readonly defect reached a stable release.

The analysis job runs on PHP 8.3 rather than the newest available, deliberately: the rule that caught the readonly defect only reports below 8.4, so analysing solely on the newest PHP would leave the supported floor the version least checked.

Upgrading

No schema or configuration change, and no update hook. Sites can update in place.

Created by: jmcerda
Created on: 30 Jul 2026 at 19:28 UTC
Last updated: 30 Jul 2026 at 19:28 UTC
Bug fixes
Unsupported

Other releases