Active
Project:
Drupal core
Version:
main
Component:
base system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2026 at 19:16 UTC
Updated:
13 Sep 2026 at 05:53 UTC
Jump to comment: Most recent
I'm not sure if this is a bug, because I'm not sure if Drupal ever intended to support symfony lazy services, but I noticed that if someone marks a dependency as lazy, it will not be serialized by DependencySerializationTrait.
#[Autowire(service: 'event_dispatcher', lazy: true)]use DependencySerializationTrait;$reverse_container->getId($value) returns NULL.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
Comment #2
mfbFixing copy/paste error
Comment #4
hoxton commentedas per Drupal Doc i think calling serialization on dependent service even if they were marked lazy, shall be treated as a use and should add the service as a whole and give valid serialization.
Comment #5
hoxton commented@mfb, i tried to replicate this issue on local with given step and was not able do so. Can you please update in what context this happened and what you used to get this issue.