Skip to content

#312 - Read-only interfaces for the process manager and the registries - #315

Merged
njoubert-cleverage merged 2 commits into
mainfrom
312
Oct 20, 2026
Merged

njoubert-cleverage merged 2 commits into
mainfrom
312

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #312.

ProcessManager, ProcessConfigurationRegistry and TransformerRegistry are @final since 5.4 (#279) and TaskRegistry is final: without interfaces, an application could not decorate or replace them once final. New read-only interfaces, implemented by the existing classes:

Interface Methods Alias of
Manager\ProcessManagerInterface execute() cleverage_process.manager.process
Registry\ProcessConfigurationRegistryInterface getProcessConfiguration(), getProcessConfigurations(), hasProcessConfiguration() cleverage_process.registry.process_configuration
Registry\TransformerRegistryInterface getTransformer(), getTransformers(), hasTransformer() cleverage_process.registry.transformer
Registry\TaskRegistryInterface getTask() cleverage_process.registry.task
  • Not in the interfaces: the internal state of the manager (getProcessHistory(), getTaskConfiguration(), reset()), the deprecated TransformerRegistry::addTransformer().
  • Autowiring aliases for the four interfaces (the class aliases are kept).
  • ProcessConfigurationRegistry::getProcessConfigurations(): PHPDoc array<string, ProcessConfiguration> (indexed by process code, as returned).
  • The services of the bundle keep their class types; they can be typed on the interfaces in v6.0, and the ui bundle once released (Type the process manager and the process configuration registry on their process-bundle interfaces ui-process-bundle#186).
  • Documentation: "Executing a process from PHP" (advanced workflow). CHANGELOG.

Tests: CleverAgeProcessExtensionTest::testServicesCanBeAutowiredByInterface().

Checked in the container (978 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.

Requirements

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

Breaking changes

None: new interfaces implemented by the existing classes.

🤖 Generated with Claude Code

njoubert-cleverage and others added 2 commits October 20, 2026 14:59
- New ProcessManagerInterface (execute()),
  ProcessConfigurationRegistryInterface (getProcessConfiguration(),
  getProcessConfigurations(), hasProcessConfiguration()),
  TransformerRegistryInterface (getTransformer(), getTransformers(),
  hasTransformer(), not the deprecated addTransformer()) and
  TaskRegistryInterface (getTask()), implemented by the existing classes.
- Autowiring aliases for the four interfaces.
- Tests, documentation (advanced workflow) and CHANGELOG updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 327abd1 into main Oct 20, 2026
18 checks passed
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.

Add interfaces for ProcessManager and the registries before they become final

1 participant