Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"react/event-loop": "^1.6.0",
"react/promise": "^3.3.0",
"wyrihaximus/constants": "^1.6.0",
"wyrihaximus/metrics": "^3",
"wyrihaximus/metrics": "^3.0.0",
"wyrihaximus/pool-info": "^2.0",
"wyrihaximus/ticking-promise": "^3.1.0"
"wyrihaximus/ticking-promise": "^3.2.0"
},
"require-dev": {
"react-parallel/pool-tests": "^5.1.0 || ^6.0.0",
"wyrihaximus/async-test-utilities": "^12.2.0",
"react-parallel/pool-tests": "^7.0.0",
"wyrihaximus/async-test-utilities": "^13.3.0",
"wyrihaximus/makefiles": "^0.12.3"
},
"autoload": {
Expand Down
1,688 changes: 984 additions & 704 deletions composer.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions etc/qa/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ parameters:
-
message: '#Method ReactParallel\\Pool\\Test\\Direct::run\(\) should return T\|null but returns T\|void.#'
path: ../../src/Direct.php
-
identifier: shipmonk.nonNormalizedType
path: ../../src/Direct.php
count: 10
ergebnis:
noExtends:
classesAllowedToBeExtended:
Expand Down
2 changes: 1 addition & 1 deletion examples/echo.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

$loop = Factory::create();
$infinite = new Direct($loop, new EventLoopBridge($loop), 1);
$infinite->run(static function () {
$infinite->run(static function (): string {
sleep(1);

return 'Hoi!';
Expand Down
2 changes: 1 addition & 1 deletion examples/exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

$infinite = new Direct($loop, new EventLoopBridge($loop), 1);

$infinite->run(static function () {
$infinite->run(static function (): string {
throw new RuntimeException('Whoops I did it again!');

return 'We shouldn\'t reach this!';
Expand Down
4 changes: 2 additions & 2 deletions examples/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

$tick = static function () use (&$promises, $infinite, $loop, $signalHandler, $json, &$tick): void {
if (count($promises) < 1000) {
$promises[] = $infinite->run(static function ($json) {
$json = json_decode($json, true);
$promises[] = $infinite->run(static function ($json): string {
$json = json_decode((string) $json, true);

return md5(json_encode($json));
}, [$json]);
Expand Down
2 changes: 1 addition & 1 deletion examples/sleep.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
sleep($sleep);

return $sleep;
}, [random_int(1, 13)])->then(static function (int $sleep) use ($i) {
}, [random_int(1, 13)])->then(static function (int $sleep) use ($i): int {
echo $i, '; ', $sleep, PHP_EOL;

return $sleep;
Expand Down
4 changes: 1 addition & 3 deletions examples/versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
$finite->kill();
$loop->stop();
});
$finite->run(static function (): array {
return array_merge(...array_map(static fn (string $package): array => [$package => InstalledVersions::getPrettyVersion($package)], InstalledVersions::getInstalledPackages()));
})->then(static function (array $versions): void {
$finite->run(static fn (): array => array_merge(...array_map(static fn (string $package): array => [$package => InstalledVersions::getPrettyVersion($package)], InstalledVersions::getInstalledPackages())))->then(static function (array $versions): void {
var_export($versions);
});

Expand Down
Loading