Needs review
Project:
Drupal core
Version:
main
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2026 at 10:00 UTC
Updated:
20 Apr 2026 at 12:41 UTC
Jump to comment: Most recent
Followup from #3583505: Use Symfony PhpDumper instead of a serialized array container structure
Drupal containers are not completely frozen; we override Symfony's Container::set() because we make some changes at runtime:
public function set(string $id, ?object $service): void {
// Symfony prevents replacing already-initialized services. Drupal allows
// this; ModuleInstaller swaps the route provider during module install.
unset($this->services[$id]);
parent::set($id, $service);
}
Find out all places that we do this
Figure out a better way
Remove this override
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 #3
longwaveInstead of swapping route_provider for the lazy builder, the lazy builder now becomes a decorator that does nothing by default, but adds a method to mark the routes as stale so they will be rebuilt on the next route lookup.