From 189a9f9b3388f557a4c80b61698bb8c4e258dcb8 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sat, 19 Feb 2022 22:54:08 +0100 Subject: [PATCH] Add PHP 8.x support --- composer.json | 6 +++--- composer.lock | 4 ++-- tests/ChildProcessPromiseClosureTest.php | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 8ac43e2..f850a52 100644 --- a/composer.json +++ b/composer.json @@ -9,11 +9,11 @@ } ], "require": { - "php": "^7.4", + "php": "^8 || ^7.4", "react/event-loop": "^1.2", "react/promise": "^2.7", - "wyrihaximus/react-child-process-closure": "^1.0", - "wyrihaximus/react-child-process-messenger": "^4.0" + "wyrihaximus/react-child-process-closure": "^1.2", + "wyrihaximus/react-child-process-messenger": "^4.0.2" }, "require-dev": { "wyrihaximus/async-test-utilities": "^4.2" diff --git a/composer.lock b/composer.lock index 150a1cb..0bdba6f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4e0ac18a5fded0f8ff3a8006a45ace37", + "content-hash": "5cc92677c880f54b97524909edd57fe1", "packages": [ { "name": "cakephp/core", @@ -10232,7 +10232,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4" + "php": "^8 || ^7.4" }, "platform-dev": [], "platform-overrides": { diff --git a/tests/ChildProcessPromiseClosureTest.php b/tests/ChildProcessPromiseClosureTest.php index d965414..2d72868 100644 --- a/tests/ChildProcessPromiseClosureTest.php +++ b/tests/ChildProcessPromiseClosureTest.php @@ -18,7 +18,9 @@ public function testChildProcessPromiseClosure(): void { $data = 1337; $result = $this->await( - childProcessPromiseClosure(Loop::get(), static fn (): array => [$data]) + childProcessPromiseClosure(Loop::get(), static function () use ($data): array { + return [$data]; + }) ); Loop::run();