adachsoft / workflow-symfony-cli
Symfony Console commands and formatters for workflow inspection, execution, validation and debugging.
Requires
- php: ^8.3
- adachsoft/collection: ^3.0
- adachsoft/symfony-console-io: ^0.1
- adachsoft/workflow: ^5.0
- symfony/console: ^7.3
Requires (Dev)
- adachsoft/php-code-style: ^0.7.1
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^12.4
- rector/rector: ^2.8
- symplify/phpstan-rules: ^14.19
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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\\WorkflowDefinitionRepositoryInterfaceAdachSoft\\WorkflowSymfonyCli\\Formatter\\WorkflowDetailTextFormatterAdachSoft\\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.