Repository navigation
Description
Description
The bundle uses the Bundle + Extension + Configuration triplet: CleverAgeProcessBundle, CleverAgeProcessExtension, Configuration, and service definitions in YAML (config/services/*.yaml).
Since Symfony 6.1 (the bundle requires ^6.4), the recommended way is a single AbstractBundle class:
configure(DefinitionConfigurator): configuration tree (currentConfiguration);loadExtension(array, ContainerConfigurator, ContainerBuilder): service loading, registry arguments,generic_transformersdefinitions (currentCleverAgeProcessExtension::load());build(): compiler passes (unchanged).
The best practices for reusable bundles also recommend PHP over YAML for the bundle service definitions (config/services.php or config/services/*.php): faster to load, checked by static analysis, no need of the YAML loader.
Proposed fix
- Move the configuration tree and the extension logic to
CleverAgeProcessBundle extends AbstractBundle; removeCleverAgeProcessExtensionandConfiguration(or keepConfigurationas a deprecated wrapper if it is used outside the bundle). - Convert
config/services/*.yamlto PHP (same service ids). - Configuration root: decide together with Rename config root to "cleverage_process" #111 (rename
clever_age_processtocleverage_process),AbstractBundlederives the alias from the bundle name. - To be done after DependencyInjection: simplify service loading and replace deprecated prototype() calls in Configuration #271 (service loading simplification,
arrayPrototype()), Fetch tasks from a service locator instead of the service container (v5 step of #114) #275 and TransformerRegistry: lazy-load transformers through a service locator indexed by code #276 (locators), and the remaining step of Apply Symfony best practices - Services #149, so that the conversion only moves code. - Apply the same change to the bridge bundles (see below).
Bridge bundles
The bridge bundles use the same Bundle + Extension + Configuration triplet and YAML service definitions (config/services/*.yaml), so they must be converted the same way (AbstractBundle, PHP service definitions, same service ids), one ticket/PR per bundle once this one is done:
- archive-process-bundle
- cache-process-bundle
- doctrine-process-bundle
- flysystem-process-bundle
- rest-process-bundle
- soap-process-bundle
- ui-process-bundle
Their configuration root is handled with their own rename (cleverage_<x>_process); the removal of their Extension/Configuration classes is a breaking change for each bridge (next major).
Requirements
- Documentation updates
- Reference
- Cookbooks
- Changelog
- Unit tests
Breaking changes
- Major:
CleverAgeProcessExtensionandConfigurationare removed (code extending or instantiating them, e.g.new Configuration()in tests, must be updated). - None for applications: same configuration tree (unless Rename config root to "cleverage_process" #111 is done at the same time), same service ids.
Activity