devhelp/flow-control
Laravel/PHP utilities for controlling application flow: helpers and patterns for branching, conditional execution, retries, and early exits. Designed to simplify complex control logic and keep code paths readable and consistent across projects.
Flow class is designed to handle async/sync workflows (e.g., triggering actions based on conditions).if-else or switch-case blocks for workflows.Flow class, it’s unclear how tightly it couples to Laravel’s ecosystem (e.g., queues, jobs, or Eloquent).spatie/laravel-state-machine).Flow class mockable? Can workflows be tested in isolation?Flow class), refactoring may be costly.spatie/laravel-state-machine) or event sourcing?config/app.php or a service provider).ShouldQueue jobs).workflows table (similar to jobs table).spatie/laravel-queue-supervisor).if-else block at a time with the Flow class.config() helper or a package like spatie/laravel-config-array.// config/workflows/order_processing.php
return [
'steps' => [
'validate_order' => App\Actions\ValidateOrder::class,
'charge_customer' => App\Actions\ChargeCustomer::class,
],
];
laravel/framework version constraints in composer.json:
"require": {
"laravel/framework": "^10.0",
"devhelp/flow-control": "^1.0"
}
pcntl for parallel steps).Schema::create('workflow_executions', function (Blueprint $table) {
$table->id();
$table->string('workflow_name');
$table->json('context');
$table->timestamps();
});
Flow class.Flow class or service to wrap the package (for abstraction).laravel.log or a dedicated table).Flow class) reduce duplication.WORKFLOWS.md with diagrams (e.g., Mermaid.js) or comments.composer.json to avoid breaking changes.How can I help you explore Laravel packages today?