Skip to content

Commit a3976c4

Browse files
committed
Updated the Console to use the action's RunnableInterface
1 parent 32b3476 commit a3976c4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Console.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010
use Kiboko\Component\Runtime\Action\Console as ActionConsoleRuntime;
1111
use Kiboko\Component\State;
1212
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
13-
use Kiboko\Contract\Pipeline\RunnableInterface;
13+
use Kiboko\Contract\Pipeline\RunnableInterface as PipelineRunnableInterface;
14+
use Kiboko\Contract\Action\RunnableInterface as ActionRunnableInterface;
15+
use Symfony\Component\Console\Logger\ConsoleLogger;
1416
use Symfony\Component\Console\Output\ConsoleOutput;
1517

1618
final class Console implements WorkflowRuntimeInterface
1719
{
1820
private readonly State\StateOutput\Workflow $state;
1921

20-
/** @var list<RunnableInterface> */
22+
/** @var list<PipelineRunnableInterface|ActionRunnableInterface> */
2123
private array $jobs = [];
2224

2325
public function __construct(
@@ -40,12 +42,12 @@ public function loadAction(string $filename): ActionConsoleRuntime
4042
{
4143
$factory = require $filename;
4244

43-
$action = new Action($this->pipelineRunner);
45+
$action = new Action();
4446

4547
return $factory(new ActionConsoleRuntime($this->output, $action, $this->state->withAction(basename($filename))));
4648
}
4749

48-
public function job(RunnableInterface $job): self
50+
public function job(PipelineRunnableInterface|ActionRunnableInterface $job): self
4951
{
5052
$this->jobs[] = $job;
5153

0 commit comments

Comments
 (0)