Skip to content

Using Symfony tagged_iterator instead of compiler passes #7402

@mamazu

Description

@mamazu

Problem description

Currently Sulu reimplements the Symfony DI tagged_iterator functionality for many services. While this is a good idea if you want to have custom logic, this makes no sense in this case. Affected services would be:

Proposed solution

Use the constructor and call the function from there or make it immutable. So that you can't add services dynamically.

Future ideas

Maybe in the future we could replace this tagging logic with attributes like this:

#[AsLocalizationProvider]
class CustomLocalizationProvider {}

Metadata

Metadata

Assignees

Labels

DXAffecting the end developerTechnical DebtImpacts code quality, no or just small impact on end developers and users

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions