Releases: WyriHaximus/reactphp-awaitable-observable
Releases · WyriHaximus/reactphp-awaitable-observable
1.1.0
Main changes:
- Raised to PHP 8.2 as the minium PHP version
- Unlocked Promise v3
1.1.0
- Total issues resolved: 0
- Total pull requests resolved: 16
- Total contributors: 2
Dependencies 📦
- 64: Bump guzzlehttp/guzzle from 6.0.0 to 7.8.0 thanks to @dependabot[bot]
- 63: Bump guzzlehttp/psr7 from 1.0.0 to 1.9.1 thanks to @dependabot[bot]
- 61: Drop Dependabot thanks to @WyriHaximus
- 60: Bump react/async from 4.1.0 to 4.2.0 thanks to @dependabot[bot]
- 59: Bump react/promise from 2.10.0 to 2.11.0 thanks to @dependabot[bot]
- 57: Bump composer/composer from 2.6.2 to 2.6.4 thanks to @dependabot[bot]
- 50: Bump guzzlehttp/psr7 from 2.4.3 to 2.6.1 thanks to @dependabot[bot]
- 49: Bump react/async from 4.0.0 to 4.1.0 thanks to @dependabot[bot]
- 48: Bump react/promise from 2.9.0 to 2.10.0 thanks to @dependabot[bot]
- 46: Bump wyrihaximus/async-test-utilities from 5.0.23 to 5.0.25 thanks to @dependabot[bot]
- 43: Bump wyrihaximus/async-test-utilities from 5.0.19 to 5.0.22 thanks to @dependabot[bot]
- 41: Bump wyrihaximus/async-test-utilities from 5.0.12 to 5.0.19 thanks to @dependabot[bot]
- 37: Bump reactivex/rxphp from 2.0.10 to 2.0.11 thanks to @dependabot[bot]
- 34: Bump wyrihaximus/async-test-utilities from 5.0.11 to 5.0.12 thanks to @dependabot[bot]
Dependencies 📦,Enhancement ✨
- 62: PHP 8.2+ thanks to @WyriHaximus
Enhancement ✨
1.0.0
Usage
The awaitObservable
function will accept any observable and turn it into an iterator, so it can be used inside
async
in an foreach
:
use Rx\Observable;
use Rx\Scheduler\ImmediateScheduler;
use function React\Async�sync;
use function WyriHaximus\React�waitObservable;
async(function () {
$observable = Observable::fromArray(range(0, 1337), new ImmediateScheduler());
foreach (awaitObservable($observable) as $integer) {
echo $integer; // outputs 01234....13361337
}
});
Breaking the iterator
The example above assumes you won't break the iterator. There are however situations where you want to short circuit
the iterator, for such situations the break
method is provided.
use Rx\Observable;
use Rx\Scheduler\ImmediateScheduler;
use function React\Async�sync;
use function WyriHaximus\React�waitObservable;
async(function () {
$observable = Observable::fromArray(range(0, 1337), new ImmediateScheduler());
$iterator = awaitObservable($observable);
foreach ($iterator as $integer) {
echo $integer; // outputs 01234
if ($integer >= 4) {
$iterator->break();
}
}
});
1.0.0
- Total issues resolved: 0
- Total pull requests resolved: 29
- Total contributors: 2
Bug 🐞,Enhancement ✨
Dependabot 🤖,Enhancement ✨
- 33: Bump wyrihaximus/async-test-utilities from 5.0.10 to 5.0.11 thanks to @dependabot[bot]
- 32: Bump wyrihaximus/async-test-utilities from 5.0.9 to 5.0.10 thanks to @dependabot[bot]
- 26: Bump wyrihaximus/async-test-utilities from 5.0.7 to 5.0.9 thanks to @dependabot[bot]
- 24: Bump guzzlehttp/guzzle from 7.4.4 to 7.4.5 thanks to @dependabot[bot]
- 23: Bump wyrihaximus/async-test-utilities from 5.0.6 to 5.0.7 thanks to @dependabot[bot]
- 21: Bump wyrihaximus/async-test-utilities from 5.0.4 to 5.0.6 thanks to @dependabot[bot]
- 18: Bump wyrihaximus/async-test-utilities from 4.2.2 to 5.0.3 thanks to @dependabot[bot]
- 15: Bump composer/composer from 2.2.7 to 2.3.5 thanks to @dependabot[bot]
- 14: Bump guzzlehttp/psr7 from 2.1.0 to 2.2.1 thanks to @dependabot[bot]
- 12: Bump wyrihaximus/async-test-utilities from 4.2.1 to 4.2.2 thanks to @dependabot[bot]
- 10: Bump react/promise from 2.8.0 to 2.9.0 thanks to @dependabot[bot]
Enhancement ✨,Feature 🏗
- 2: Initial implementation thanks to @WyriHaximus
Enhancement ✨
- 31: Ensure lowest PHPStan understands current and key have return types thanks to @WyriHaximus
- 30: Remove label-sponsors workflow, this will be solved in a different ma… thanks to @WyriHaximus
- 29: Update contribution documentation thanks to @WyriHaximus
- 28: Use checkout v3 thanks to @WyriHaximus
- 27: CI improvements thanks to @WyriHaximus
- 25: Bump to react/async v4 final thanks to @WyriHaximus
- 19: Update tests to support new tiktoktuktak order change thanks to @WyriHaximus
- 11: Use
react/async
v4@dev thanks to @WyriHaximus - 9: Add break to stop the iterator thanks to @WyriHaximus
- 8: Make tests a bit less time sensitive thanks to @WyriHaximus
- 7: Test throwing an error after several items thanks to @WyriHaximus
- 6: Wrap example in async thanks to @WyriHaximus
- 5: Add Basic Documentation thanks to @WyriHaximus
- 4: Test errors thanks to @WyriHaximus
- 3: Rough edges clean up thanks to @WyriHaximus
- 1: Set up package skeleton thanks to @WyriHaximus