Problem/Motivation

Discovered while thinking about #3622391: Use tagged iterators in CacheTagsInvalidator, and would also fix #3612284: Circular reference on Drupal 11.4: logger.raven eagerly resolves event_dispatcher during container build and possibly also #3103620: Dependency on config storage causes circular reference in service container, the logger channel factory has all logger services eagerly injected into it - but it doesn't need them until a channel is actually required. Lazily instantiating the services via a tagged iterator would mean the services are constructed as late as possible which might sidestep some of these circular reference issues.

It would still be possible to get a circular reference if something actually tries to log something, but it might make this class of error less frequent.

Steps to reproduce

Proposed resolution

Inject the loggers via a tagged iterator.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3622395

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

longwave created an issue. See original summary.

longwave-bot made their first commit to this issue’s fork.

longwave’s picture

Status: Active » Needs review