Install
Works with Drupal: ^11.4 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
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.