The ExpireHolds queue worker (src/Plugin/QueueWorker/ExpireHolds.php) implements ContainerFactoryPluginInterface and therefore uses DependencySerializationTrait, but it declares its injected services as promoted private readonly constructor properties.

The PHPStan (Drupal ruleset) job reports four errors: dependencySerializationTraitProperty.unsupportedPrivateProperty and dependencySerializationTraitProperty.unsupportedReadOnlyProperty for each of the two properties.

This is more than lint. DependencySerializationTrait cannot restore private or readonly properties when a queued item is serialised and later resumed, so the worker would come back without its entity type manager and booking manager.

Fix: make both promoted properties protected and drop readonly, the same pattern already used elsewhere in the codebase.

Issue fork yoyaku-3611564

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

  • mably committed c4f128dc on 1.x
    fix: #3611564 ExpireHolds queue worker: DependencySerializationTrait...
mably’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.