Skip to content

Commit

Permalink
Prepare v1.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Jul 11, 2021
1 parent e3287d6 commit be6dee4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Changelog

## 1.2.0 (2021-07-11)

A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop).

* Feature: Introduce new concept of default loop with the new `Loop` class.
(#226 by @WyriHaximus, #229, #231 and #232 by @clue)

The `Loop` class exists as a convenient global accessor for the event loop.
It provides all methods that exist on the `LoopInterface` as static methods and
will automatically execute the loop at the end of the program:

```php
$timer = Loop::addPeriodicTimer(0.1, function () {
echo 'Tick' . PHP_EOL;
});

Loop::addTimer(1.0, function () use ($timer) {
Loop::cancelTimer($timer);
echo 'Done' . PHP_EOL;
});
```

The explicit loop instructions are still valid and may still be useful in some applications,
especially for a transition period towards the more concise style.
The `Loop::get()` method can be used to get the currently active event loop instance.

```php
// deprecated
$loop = React\EventLoop\Factory::create();

// new
$loop = React\EventLoop\Loop::get();
```

* Minor documentation improvements and mark legacy extensions as deprecated.
(#234 by @SimonFrings, #214 by @WyriHaximus and #233 and #235 by @nhedger)

* Improve test suite, use GitHub actions for continuous integration (CI),
update PHPUnit config and run tests on PHP 8.
(#212 and #215 by @SimonFrings and #230 by @clue)

## 1.1.1 (2020-01-01)

* Fix: Fix reporting connection refused errors with `ExtUvLoop` on Linux and `StreamSelectLoop` on Windows.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ single [`run()`](#run) call that is controlled by the user.
* [Loop implementations](#loop-implementations)
* [StreamSelectLoop](#streamselectloop)
* [ExtEventLoop](#exteventloop)
* [~~ExtLibeventLoop~~](#extlibeventloop)
* [~~ExtLibevLoop~~](#extlibevloop)
* [ExtEvLoop](#extevloop)
* [ExtUvLoop](#extuvloop)
* [~~ExtLibeventLoop~~](#extlibeventloop)
* [~~ExtLibevLoop~~](#extlibevloop)
* [LoopInterface](#loopinterface)
* [run()](#run)
* [stop()](#stop)
Expand Down Expand Up @@ -878,7 +878,7 @@ This project follows [SemVer](https://semver.org/).
This will install the latest supported version:

```bash
$ composer require react/event-loop:^1.1.1
$ composer require react/event-loop:^1.2
```

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

0 comments on commit be6dee4

Please sign in to comment.