1) Chevere\Tests\RunnerTest::testActionUnionMultipleAlternatives
Chevere\Workflow\Exceptions\JobsException: [job2]: Response **job1** conflict at parameter **foo**: Parameter `0` of type `Chevere\Parameter\StringParameter` is not compatible with type `Chevere\Parameter\IntParameter`
$run = run(
workflow(
job1: sync(
#[_return(new _union(new _int(), new _float()))]
function (): int|float {
return 123;
}
),
job2: sync(
new class() extends Action {
public function __invoke(float|int|string $foo): array
{
return [
'foo' => $foo,
];
}
},
foo: response('job1')
),
),
);
$this->assertSame(
[
'foo' => $run->response('job1')->int(),
],
$run->response('job2')->array()
);
Message should be
...is not compatible with type <list union types>and not just panic on the first mismatch.