diff --git a/CHANGELOG.md b/CHANGELOG.md index 22a7e6b..0ecb328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Replaced EventFactory::create with Loop::get as the factory has been deprecated. ## [3.0.0] - 2020-12-17 diff --git a/composer.json b/composer.json index 4f3005f..762641f 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "php": "^7.1|^8.0", "php-http/httplug": "^2.0", "react/http": "^1.0", - "react/event-loop": "^1.0", + "react/event-loop": "^1.2", "php-http/discovery": "^1.0" }, "require-dev": { diff --git a/src/ReactFactory.php b/src/ReactFactory.php index 62dbe94..e882326 100644 --- a/src/ReactFactory.php +++ b/src/ReactFactory.php @@ -2,7 +2,7 @@ namespace Http\Adapter\React; -use React\EventLoop\Factory as EventLoopFactory; +use React\EventLoop\Loop; use React\EventLoop\LoopInterface; use React\Http\Browser; use React\Socket\ConnectorInterface; @@ -19,7 +19,7 @@ class ReactFactory */ public static function buildEventLoop(): LoopInterface { - return EventLoopFactory::create(); + return Loop::get(); } /**