From 42ce42a821f9fc2eb38cbf81c6dc4c9a0cb7e9a2 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Wed, 13 Dec 2023 22:01:22 +0100 Subject: [PATCH] Add wyrihaximus/react-event-loop-rx-scheduler-hook-up for scheduler hook up --- composer.json | 3 ++- composer.lock | 56 ++++++++++++++++++++++++++++++++++++++++++- tests/ChannelTest.php | 6 ++++- 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index dcdf779..2b00cce 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "react/promise": "^2.11 || ^3.1", "reactivex/rxphp": "^2.0.12", "wyrihaximus/constants": "^1.6", - "wyrihaximus/react-awaitable-observable": "^1.1" + "wyrihaximus/react-awaitable-observable": "^1.1", + "wyrihaximus/react-event-loop-rx-scheduler-hook-up": "^0.1.1" }, "require-dev": { "wyrihaximus/async-test-utilities": "^7.2", diff --git a/composer.lock b/composer.lock index 55c269e..a1f2715 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": "1aad54e17f25830737b0ddeec5338f44", + "content-hash": "324256d1d841d396292b5dc9dbd99b8a", "packages": [ { "name": "lcobucci/clock", @@ -771,6 +771,60 @@ } ], "time": "2023-11-30T22:01:46+00:00" + }, + { + "name": "wyrihaximus/react-event-loop-rx-scheduler-hook-up", + "version": "0.1.1", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up.git", + "reference": "462e794cba3c810b77d1e8cb33be43a902673272" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up/zipball/462e794cba3c810b77d1e8cb33be43a902673272", + "reference": "462e794cba3c810b77d1e8cb33be43a902673272", + "shasum": "" + }, + "require": { + "php": "^8.1", + "react/event-loop": "^1.3", + "reactivex/rxphp": "^2.0" + }, + "conflict": { + "azjezz/psl": "<2" + }, + "require-dev": { + "wyrihaximus/async-test-utilities": "^5.0.25" + }, + "type": "library", + "extra": { + "unused": [ + "wyrihaximus/react-mutex", + "wyrihaximus/react-mutex-contracts" + ] + }, + "autoload": { + "files": [ + "src/bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "🪝 Hook up ReactPHP Event Loop to the RxPHP Scheduler", + "support": { + "issues": "https://github.com/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up/issues", + "source": "https://github.com/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up/tree/0.1.1" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2023-02-26T15:05:42+00:00" } ], "packages-dev": [ diff --git a/tests/ChannelTest.php b/tests/ChannelTest.php index c785c08..0441ca5 100644 --- a/tests/ChannelTest.php +++ b/tests/ChannelTest.php @@ -48,7 +48,11 @@ public function channel(): void $promises = []; foreach ($channels as $channel) { - $promises[] = async(static fn (Channel $channel): array => [...$recvObservable->channel($channel)])($channel); + $promises[] = async( + static fn (Channel $channel): array => [ + ...$recvObservable->channel($channel), + ] + )($channel); } $rd = await(all($promises));