First set of tests, argument unwrapping/injection

This commit is contained in:
2024-03-19 00:01:12 +01:00
parent 74960345ba
commit 35efaa1b0d
11 changed files with 870 additions and 8 deletions

View File

@ -31,7 +31,9 @@ class Command
public function call(Context $context): PromiseInterface
{
return new Promise(function (callable $resolve) use ($context) {
$resolve(call_user_func($this->handler, $context));
$args = $context->toMethodParameters($this->handler);
$resolve(call_user_func($this->handler, ...$args));
//$resolve(call_user_func($this->handler, $context));
return;
});
}