Skip to content

#277 - Use AbstractBundle and PHP service definitions - #516

Merged
njoubert-cleverage merged 1 commit into
dev-v6from
277
Dec 2, 2026
Merged

njoubert-cleverage merged 1 commit into
dev-v6from
277

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #277.

CleverAgeProcessBundle extends AbstractBundle:

  • configure(): the configuration tree, moved from the internal Configuration class (removed);
  • loadExtension(): the loading of the services, the autoconfiguration, the deprecation checks, the arguments of the process configuration registry and the generic transformers, moved from the internal CleverAgeProcessExtension class (removed);
  • build(): compiler passes, unchanged.

Details:

  • the alias stays cleverage_process ($extensionAlias, AbstractBundle would guess clever_age_process);
  • the service definitions are written in PHP, one file per former YAML file (config/services/*.php), so that the _defaults of task.php / transformer.php stay limited to their file; config/ is analysed by PHPStan, Rector and PHP-CS-Fixer;
  • the services are imported with an absolute path and getPath() is kept, so that a class extending the bundle (deprecated, @final since 5.4) still loads them;
  • pure move of the deprecation layers (checkErrorStrategies(), checkTaskReferences(), now private, service / errors nodes, public tasks and transformers): their removal is owned by v6.0: remove the deprecated code #292, whose paths are to be updated after this merge;
  • tests: ExtensionLoader helper (the extension of an AbstractBundle requires kernel.environment / kernel.build_dir with Symfony 7.4), TestKernel::getTaskCodes() and the "every service definition file is loaded" test read the PHP files.

Equivalence: the container loaded by the extension (YamlDumper dump, plus the autoconfiguration) and the configuration reference (YamlReferenceDumper) are identical before and after, with Symfony 7.4 and 8.2 (only kernel.project_dir, the directory of the dump script, differs).

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None for applications: same configuration tree, same service ids and definitions. The removed CleverAgeProcessExtension and Configuration classes were @internal.

🤖 Generated with Claude Code

CleverAgeProcessBundle extends AbstractBundle: the configuration tree (configure()) and the loading of the services
(loadExtension()) move from the internal Configuration and CleverAgeProcessExtension classes, removed, to the bundle.
The service definitions are written in PHP (config/services/*.php, one file per former YAML file), analysed by
PHPStan, Rector and PHP-CS-Fixer. Same configuration tree (root cleverage_process), same service ids and definitions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant