Search by

adachsoft / workflow-symfony-cli

Arkadiusz Adach

Symfony Console commands and formatters for workflow inspection, execution, validation and debugging.

Package info

gitlab.com/a.adach/workflow-symfony-cli

Issues

pkg:composer/adachsoft/workflow-symfony-cli

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-10-26 20:43 UTC

This package is not auto-updated.

Last update: 2026-10-26 19:44:56 UTC


README

Symfony Console commands and formatters for inspecting, validating, and debugging workflow definitions and runs.

Features

  • List available workflow definitions from a repository.
  • Display workflow details in human-readable text or JSON.
  • Inspect workflow inputs, outputs, steps, branches, and step configuration.
  • Render workflow run summaries for CLI diagnostics.
  • Extend step registration through a dedicated initializer contract.

Installation

composer require adachsoft/workflow-symfony-cli

Integration

Register AdachSoft\\WorkflowSymfonyCli\\Command\\WorkflowListCommand in the Symfony Console application and provide its constructor dependencies through your service container:

  • AdachSoft\\Workflow\\Contracts\\WorkflowDefinitionRepositoryInterface
  • AdachSoft\\WorkflowSymfonyCli\\Formatter\\WorkflowDetailTextFormatter
  • AdachSoft\\WorkflowSymfonyCli\\Formatter\\WorkflowDetailJsonFormatter

The command is exposed as workflow:list.

Usage

# List available workflows in text format.
php bin/console workflow:list

# List available workflows as JSON.
php bin/console workflow:list --format=json

# Display one workflow in text format.
php bin/console workflow:list --workflow-id=example

# Display one workflow as JSON.
php bin/console workflow:list --workflow-id=example --format=json

The command returns a non-zero exit status when an unsupported output format is selected or the requested workflow cannot be loaded.

Extending step registration

Implement AdachSoft\\WorkflowSymfonyCli\\Contract\\StepRegistryInitializerInterface when the application needs to register workflow steps before CLI commands access the workflow registry.

use AdachSoft\\Workflow\\Contracts\\StepRegistryInterface;
use AdachSoft\\WorkflowSymfonyCli\\Contract\\StepRegistryInitializerInterface;

final class ApplicationStepRegistryInitializer implements StepRegistryInitializerInterface
{
    public function initialize(StepRegistryInterface $stepRegistry): void
    {
        // Register application-specific workflow steps here.
    }
}

Documentation examples

License

This library is released under the MIT license.