yuna / flow
3.0.6
2025-11-24 18:33 UTC
Requires
- php: >=8.2
- ext-fileinfo: *
- cuyz/valinor: ^2.3
- monolog/monolog: ^3.9
- psr/log: ^3.0
- symfony/config: ^7.3
- symfony/console: ^7.3
- symfony/dependency-injection: ^7.3
- symfony/yaml: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.88
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.4
README
Pipeline Builder in PHP.
Features:
- simple to use
- reusable
- configurable
- supports YAML and PHP configuration
Installation
composer require yuna/flow:^3
Sample
In the sample below we can see example of usage - how to create pipeline and run it.
<?php
// flow.php
use function Yuna\Flow\env;
use function Yuna\Flow\param;
putenv('TEST_VAR_1=VALUE_ENV');
return [
// 'extensions' => [
// YourExtension::class
// ],
'parameters' => [
'test_1' => true,
'test_2' => env('TEST_VAR_1'),
'test_3' => param('test_1')
],
'steps' => [
[
'label' => 'Print compiled parameters',
'type' => '@yuna/debug-print-compiled-parameters'
],
[
'label' => 'Print compiled steps',
'type' => '@yuna/debug-print-compiled-steps'
]
]
];
Now, we will run this configuration with command below:
vendor/bin/flow
Code above will output:
flow.INFO: running step "Print compiled parameters"... {"label":"Print compiled parameters"}
flow.INFO: {
flow.INFO: "test_1": true,
flow.INFO: "test_2": "VALUE_ENV",
flow.INFO: "test_3": true
flow.INFO: }
flow.INFO: running step "Print compiled steps"... {"label":"Print compiled steps"}
flow.INFO: [
flow.INFO: {
flow.INFO: "label": "Print compiled parameters",
flow.INFO: "type": "@yuna/debug-print-compiled-parameters"
flow.INFO: },
flow.INFO: {
flow.INFO: "label": "Print compiled steps",
flow.INFO: "type": "@yuna/debug-print-compiled-steps"
flow.INFO: }
flow.INFO: ]
with exit code 0
Creating your own steps
Example of you own steps are provided in the bultin DebugExtension.