Skip to content

Commit aa6e3f8

Browse files
committed
Prepare v1.9.0 release
1 parent c85158a commit aa6e3f8

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# Changelog
22

3+
## 1.9.0 (2021-08-03)
4+
5+
* Feature: Add new `SocketServer` and deprecate `Server` to avoid class name collisions.
6+
(#263 by @clue)
7+
8+
The new `SocketServer` class has been added with an improved constructor signature
9+
as a replacement for the previous `Server` class in order to avoid any ambiguities.
10+
The previous name has been deprecated and should not be used anymore.
11+
In its most basic form, the deprecated `Server` can now be considered an alias for new `SocketServer`.
12+
13+
```php
14+
// deprecated
15+
$socket = new React\Socket\Server(0);
16+
$socket = new React\Socket\Server('127.0.0.1:8000');
17+
$socket = new React\Socket\Server('127.0.0.1:8000', null, $context);
18+
$socket = new React\Socket\Server('127.0.0.1:8000', $loop, $context);
19+
20+
// new
21+
$socket = new React\Socket\SocketServer('127.0.0.1:0');
22+
$socket = new React\Socket\SocketServer('127.0.0.1:8000');
23+
$socket = new React\Socket\SocketServer('127.0.0.1:8000', $context);
24+
$socket = new React\Socket\SocketServer('127.0.0.1:8000', $context, $loop);
25+
```
26+
27+
* Feature: Update `Connector` signature to take optional `$context` as first argument.
28+
(#264 by @clue)
29+
30+
The new signature has been added to match the new `SocketServer` and
31+
consistently move the now commonly unneeded loop argument to the last argument.
32+
The previous signature has been deprecated and should not be used anymore.
33+
In its most basic form, both signatures are compatible.
34+
35+
```php
36+
// deprecated
37+
$connector = new React\Socket\Connector(null, $context);
38+
$connector = new React\Socket\Connector($loop, $context);
39+
40+
// new
41+
$connector = new React\Socket\Connector($context);
42+
$connector = new React\Socket\Connector($context, $loop);
43+
```
44+
345
## 1.8.0 (2021-07-11)
446

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ This project follows [SemVer](https://semver.org/).
14831483
This will install the latest supported version:
14841484

14851485
```bash
1486-
$ composer require react/socket:^1.8
1486+
$ composer require react/socket:^1.9
14871487
```
14881488

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy