Repository navigation
#149 - Define the tasks and transformers services explicitly - #291
Merged
Merged
Conversation
Step 2 of the Symfony best practices for the bundle services: no more autowiring, autoconfiguration nor bindings for the tasks and transformers. - config/services/task.yaml / transformer.yaml: one explicit definition per task (58) and transformer (37), with a private cleverage_process.task.* / cleverage_process.transformer.* id and a public alias named after the class (service references by class, autowiring by class and $container->get() keep working). Same arguments, tags and shared settings as the previously autowired definitions (generated from them, then compared: identical). - UnavailableServicesCompilerPass: resolves the services through their class alias. - Tests and documentation updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #149 (step 2: task, transformer): apply the best practices for reusable bundles to the tasks and transformers services, which were loaded as autowired resources (
autowire: true,autoconfigure: truefor the transformers,bind).Changes
config/services/task.yaml(58 tasks) andconfig/services/transformer.yaml(37 transformers): one explicit definition per service, in the same format as the bridge bundles:shared: falsefor the tasks, tags in_defaults(monolog.loggeroncleverage_process_task/cleverage_process_transformer,cleverage.transformer);@logger(themonolog.loggertag gives the channel), the debug event dispatcher@event_dispatcher.Checks
shared, method calls, factories for the 95 classes.vendor/, then reverted):lint:containerOK,cleverage:process:helpOK,demo.transformer,demo.transformer_list,demo.transformers_edge.cached,demo.mapping_array_target_path,demo.file.csv_reader,demo.archive.zip,demo.doctrine.entitymanager.writer/batch_writerexecuted (demo.rest.getfails on the external IGN API, also without this change).composer update: 929 tests OK, PHPStan, PHP-CS-Fixer, Rector OK.Requirements
Breaking changes
None for the documented usages (same service ids, same arguments). Edge cases (minor):
@property_accessor,@serializer,@validator,@logger,@cache.app,@kernel…): an application that replaced e.g. thePropertyAccessorInterfacealias by its own implementation no longer gets it in these tasks / transformers (decorating theproperty_accessorservice still works);🤖 Generated with Claude Code