Skip to content

Commit 6942ef2

Browse files
committed
Align run $args argument with ext-parallel
1 parent 43212b0 commit 6942ef2

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"php": "^7.3",
1414
"ext-parallel": "*",
1515
"react/event-loop": "^1.1",
16-
"wyrihaximus/react-parallel-future-to-promise-converter": "^1.0"
16+
"wyrihaximus/react-parallel-future-to-promise-converter": "^1.0 || ^1.0.1"
1717
},
1818
"require-dev": {
1919
"thecodingmachine/safe": "^0.1.16",

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
parameters:
22
ignoreErrors:
33
- '#Do not throw the \\Exception base class. Instead, extend the \\Exception base class. More info: http:\/\/bit.ly\/subtypeexception#'
4-
- '#In method "WyriHaximus\\React\\Parallel\\Runtime::run", parameter \$args can be type-hinted to "array". More info: http:\/\/bit.ly\/usetypehint#'
54

65
includes:
76
- vendor/wyrihaximus/async-test-utilities/rules.neon

src/Runtime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public function __construct(FutureToPromiseConverter $futureToPromiseConverter,
2424

2525
/**
2626
* @param Closure $callable
27-
* @param array<int, mixed> $args
27+
* @param mixed[] $args
2828
* @return PromiseInterface
2929
*/
30-
public function run(Closure $callable, ...$args): PromiseInterface
30+
public function run(Closure $callable, array $args = []): PromiseInterface
3131
{
3232
$future = $this->runtime->run($callable, $args);
3333

0 commit comments

Comments
 (0)