-
Notifications
You must be signed in to change notification settings - Fork 351
Open
Labels
DXAffecting the end developerAffecting the end developerTechnical DebtImpacts code quality, no or just small impact on end developers and usersImpacts code quality, no or just small impact on end developers and users
Milestone
Description
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:
- src/Sulu/Component/Symfony/CompilerPass/TaggedServiceCollectorCompilerPass.php (TaggedServiceCollectorCompilerPass ->
tagged_iterator
#7424) - MarkupBundle/DependencyInjection/CompilerPass/TagCompilerPass.php
- MarkupBundle/DependencyInjection/CompilerPass/ParserCompilerPass.php (Using
tagged_iterator
s for the markup listener #7403) - RouteBundle/DependencyInjection/RouteGeneratorCompilerPass.php
- MediaBundle/DependencyInjection/FormatCacheClearerCompilerPass.php (Deprecating FormatCacheClearerCompilerPass #8037)
- AdminBundle/DependencyInjection/Compiler/AddAdminPass.php (Deprecate
AddAdminPass
compiler pass #8034) - MediaBundle/DependencyInjection/ImageTransformationCompilerPass.php
- PageBundle/DependencyInjection/Compiler/StructureExtensionCompilerPass.php
- CoreBundle/DependencyInjection/Compiler/RegisterContentTypesCompilerPass.php
- AdminBundle/DependencyInjection/Compiler/AddMetadataProviderPass.php (Deprecating the
AddMetadataProviderPass
#8038 ) - AudienceTargetingBundle/DependencyInjection/Compiler/AddRulesPass.php (Using
tagged_iterator
for RuleCollections #7405) -
DocumentManagerBundle/DependencyInjection/Compiler/InitializerPass.php (Usetagged_iterator
for Initalizer services #7724) - PageBundle/DependencyInjection/Compiler/SmartContentDataProviderCompilerPass.php
- CoreBundle/DependencyInjection/Compiler/ListBuilderMetadataProviderCompilerPass.php
- SecurityBundle/DependencyInjection/Compiler/AccessControlProviderPass.php (Deprecating
AccessControlProviderPass
in favor of tagged_iterator #8039 ) - CoreBundle/DependencyInjection/Compiler/RegisterLocalizationProvidersPass.php (Deprecate the LocalizationProviderCompilerPass #8035)
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 developerAffecting the end developerTechnical DebtImpacts code quality, no or just small impact on end developers and usersImpacts code quality, no or just small impact on end developers and users