Repository navigation
#305 - Bundle best practices: residues of the review - #306
Merged
Merged
Conversation
- The generic transformers are no longer autowired (explicit arguments). - ProcessHelpCommand receives the TaskRegistry as second argument instead of the service container; passing a container (constructor of v5.3) is deprecated. The unreleased third argument is removed. - New internal PublicTaskDeprecationCompilerPass: the tasks of the application made public only by the TaskInterface autoconfiguration get the container.private tag (fetching them from the container is deprecated, as for the tasks of the bundle). Tasks made public by the application itself (service, _defaults, _instanceof, #[Autoconfigure]) are not concerned. - Missing deprecation notices: InputAggregatorTask, CheckSerializerCompilerPass, "errors" task configuration key (setDeprecated(), use "error_outputs"). - TaskConfiguration::getErrors(): @deprecated PHPDoc instead of the native #[\Deprecated] attribute (a single notice on PHP 8.4+); $logErrors marked @deprecated. - CleverAgeProcessBundle marked @Final since 5.4. - Documentation and CHANGELOG updated, tests added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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 #305: residues of the bundle best practices work (#149, #273, #275, #279).
Generic transformers
CleverAgeProcessExtension: no moresetAutowired(true)on theGenericTransformerdefinitions, their arguments are explicit.ProcessHelpCommand@cleverage_process.registry.taskinstead of@service_container.(ProcessConfigurationRegistry, TaskRegistry|ContainerInterface). Passing a container, as in v5.3, still works and triggers a deprecation (5.4); the$containerproperty is only set in that case and is@deprecated. The third argument?TaskRegistry, added after v5.3 and never released, is removed.Application tasks public through the autoconfiguration
PublicTaskDeprecationCompilerPass(beforeResolveInstanceofConditionalsPass): an autoconfigured service implementingTaskInterface, made public only by the autoconfiguration of the bundle, gets thecontainer.privatetag (cleverage/process-bundle5.4), like the tasks of the bundle. Fetching it directly from the container is deprecated, it will be private in v6.0 (v6.0: remove the deprecated code #292).public: trueon the service or in_defaults,_instanceofrule,#[Autoconfigure(public: true)]).Deprecation notices
InputAggregatorTask:trigger_deprecation()in a new constructor,@deprecated since 5.4. The good practices page no longer suggests it.CheckSerializerCompilerPass:trigger_deprecation()in a new constructor (same asRegistryCompilerPass),@deprecated since 5.4.errorstask configuration key:setDeprecated()in the configuration tree (same asservice).TaskConfiguration::getErrors():@deprecatedPHPDoc instead of the native#[\Deprecated]attribute, so a single notice on PHP 8.4+;$logErrorsmarked@deprecated(unused).@final:CleverAgeProcessBundleis@final since 5.4.Tests: new
CheckSerializerCompilerPassTestandPublicTaskDeprecationCompilerPassTest(with the passes of the container compilation,AliasDeprecatedPublicServicesPassincluded), deprecation tests forInputAggregatorTask,errorsand the help command;KernelTestignores the expectedInputAggregatorTaskdeprecation.Checked in the container (972 tests): highest dependencies (PHP 8.5, Symfony 8.1), lowest dependencies (PHP 8.2, Symfony 6.4.0), Symfony 6.4.48 on PHP 8.2 and 8.5, Symfony 7.4: no deprecation, no risky test (with pcov coverage). PHPStan, PHP-CS-Fixer and Rector OK.
cleverage:process:helprun from the test kernel: works, no deprecation.#292 (v6.0 removals) is updated with these deprecations.
Requirements
Breaking changes
None. New deprecation notices (5.4):
ProcessHelpCommandbuilt with a container,InputAggregatorTask,CheckSerializerCompilerPass,errorskey, direct access from the container to the application tasks made public only by the autoconfiguration.🤖 Generated with Claude Code