Skip to content

Commit be6dee4

Browse files
committed
Prepare v1.2.0 release
1 parent e3287d6 commit be6dee4

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

CHANGELOG.md

+41
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# Changelog
22

3+
## 1.2.0 (2021-07-11)
4+
5+
A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop).
6+
7+
* Feature: Introduce new concept of default loop with the new `Loop` class.
8+
(#226 by @WyriHaximus, #229, #231 and #232 by @clue)
9+
10+
The `Loop` class exists as a convenient global accessor for the event loop.
11+
It provides all methods that exist on the `LoopInterface` as static methods and
12+
will automatically execute the loop at the end of the program:
13+
14+
```php
15+
$timer = Loop::addPeriodicTimer(0.1, function () {
16+
echo 'Tick' . PHP_EOL;
17+
});
18+
19+
Loop::addTimer(1.0, function () use ($timer) {
20+
Loop::cancelTimer($timer);
21+
echo 'Done' . PHP_EOL;
22+
});
23+
```
24+
25+
The explicit loop instructions are still valid and may still be useful in some applications,
26+
especially for a transition period towards the more concise style.
27+
The `Loop::get()` method can be used to get the currently active event loop instance.
28+
29+
```php
30+
// deprecated
31+
$loop = React\EventLoop\Factory::create();
32+
33+
// new
34+
$loop = React\EventLoop\Loop::get();
35+
```
36+
37+
* Minor documentation improvements and mark legacy extensions as deprecated.
38+
(#234 by @SimonFrings, #214 by @WyriHaximus and #233 and #235 by @nhedger)
39+
40+
* Improve test suite, use GitHub actions for continuous integration (CI),
41+
update PHPUnit config and run tests on PHP 8.
42+
(#212 and #215 by @SimonFrings and #230 by @clue)
43+
344
## 1.1.1 (2020-01-01)
445

546
* Fix: Fix reporting connection refused errors with `ExtUvLoop` on Linux and `StreamSelectLoop` on Windows.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ single [`run()`](#run) call that is controlled by the user.
2222
* [Loop implementations](#loop-implementations)
2323
* [StreamSelectLoop](#streamselectloop)
2424
* [ExtEventLoop](#exteventloop)
25-
* [~~ExtLibeventLoop~~](#extlibeventloop)
26-
* [~~ExtLibevLoop~~](#extlibevloop)
2725
* [ExtEvLoop](#extevloop)
2826
* [ExtUvLoop](#extuvloop)
27+
* [~~ExtLibeventLoop~~](#extlibeventloop)
28+
* [~~ExtLibevLoop~~](#extlibevloop)
2929
* [LoopInterface](#loopinterface)
3030
* [run()](#run)
3131
* [stop()](#stop)
@@ -878,7 +878,7 @@ This project follows [SemVer](https://semver.org/).
878878
This will install the latest supported version:
879879

880880
```bash
881-
$ composer require react/event-loop:^1.1.1
881+
$ composer require react/event-loop:^1.2
882882
```
883883

884884
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.

0 commit comments

Comments
 (0)