Skip to content

Type the process manager and the process configuration registry on their process-bundle interfaces #186

Open

Description

@njoubert-cleverage

Description

cleverage/process-bundle#312 (PR cleverage/process-bundle#315) adds read-only interfaces for the process manager and the registries, with autowiring aliases: ProcessManagerInterface, ProcessConfigurationRegistryInterface, TransformerRegistryInterface, TaskRegistryInterface. The concrete classes are @final since 5.4 and will be final in process-bundle v6.0: as long as the ui bundle depends on them, an application cannot decorate or replace these services for the ui.

Five constructors of the ui bundle are typed on the concrete classes (checked on main @ 4467554), and only use methods of the interfaces:

Class Typed on Methods used
Controller\ProcessExecuteController ProcessManager execute()
Message\ProcessExecuteHandler ProcessManager execute()
Form\Type\LaunchType ProcessConfigurationRegistry getProcessConfiguration()
Manager\ProcessConfigurationsManager ProcessConfigurationRegistry getProcessConfiguration(), getProcessConfigurations(), hasProcessConfiguration()
Validator\IsValidProcessCodeValidator ProcessConfigurationRegistry getProcessConfiguration(), hasProcessConfiguration()

Type them on ProcessManagerInterface / ProcessConfigurationRegistryInterface. The services keep being wired explicitly with @cleverage_process.manager.process / @cleverage_process.registry.process_configuration (config/services/*.yaml), unchanged. The tests creating stubs of ProcessConfigurationRegistry can stub the interface.

Prerequisite: a released process-bundle containing the interfaces (5.4): raise the requirement from cleverage/process-bundle: ^5.3 to ^5.4. Not before the release: the interfaces do not exist in 5.3.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None: the constructor parameters are widened (the concrete classes implement the interfaces). Applications must use process-bundle 5.4 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions