From 0409cb2f841a1391dae562b9a4e38b437ca6f376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Mon, 20 May 2024 18:46:25 +0200 Subject: [PATCH] Improve PHP 8.4+ support by avoiding implicitly nullable types --- composer.json | 2 +- src/FiberFactory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9c2f076..5d4082b 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "require": { "php": ">=8.1", "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.8 || ^1.2.1" + "react/promise": "^3.2 || ^2.8 || ^1.2.1" }, "require-dev": { "phpstan/phpstan": "1.10.39", diff --git a/src/FiberFactory.php b/src/FiberFactory.php index 93480e6..ee90818 100644 --- a/src/FiberFactory.php +++ b/src/FiberFactory.php @@ -22,7 +22,7 @@ public static function create(): FiberInterface return (self::factory())(); } - public static function factory(\Closure $factory = null): \Closure + public static function factory(?\Closure $factory = null): \Closure { if ($factory !== null) { self::$factory = $factory;