8000 Prepare v1.10.0 release · Dheia/socket-reactphp@d132fde · GitHub
[go: up one dir, main page]

Skip to content

Commit d132fde

Browse files
committed
Prepare v1.10.0 release
1 parent 2fde15a commit d132fde

File tree

2 files changed

+52
-8
lines changed

2 files changed

+52
-8
lines changed

CHANGELOG.md

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

3+
## 1.10.0 (2021-09-13)
4+
5+
* Feature: Support listening on existing file descriptors (FDs) with `SocketServer`.
6+
(#269 by @clue)
7+
8+
```php
9+
$socket = new React\Socket\SocketSever('php://fd/3');
10+
```
11+
12+
This is particularly useful when using
+
[systemd socket activation](https://www.freedesktop.org/software/systemd/man/systemd.socket.html)
14+
like this:
15+
16+
```bash
17+
$ systemd-socket-activate -l 8000 php examples/03-http-server.php php://fd/3
18+
```
19+
20+
* Feature: Improve error messages for failed connection attempts with `errno` and `errstr`.
21+
(#265, #266, #267, #270 and #271 by @clue and #268 by @SimonFrings)
22+
23+
All error messages now always include the appropriate `errno` and `errstr` to
24+
give more details about the error reason when available. Along with these
25+
error details exposed by the underlying system functions, it will also
26+
include the appropriate error constant name (such as `ECONNREFUSED`) when
27+
available. Accordingly, failed TCP/IP connections will now report the actual
28+
underlying error condition instead of a generic "Connection refused" error.
29+
Higher-level error messages will now consistently report the connection URI
30+
scheme and hostname used in all error messages.
31+
32+
For most common use cases this means that simply reporting the `Exception`
33+
message should give the most relevant details for any connection issues:
34+
35+
```php
36+
$connector = new React\Socket\Connector();
37+
$connector->connect($uri)->then(function (React\Socket\ConnectionInterface $conn) {
38+
// …
39+
}, function (Exception $e) {
40+
echo 'Error:' . $e->getMessage() . PHP_EOL;
41+
});
42+
```
43+
44+
* Improve test suite, test against PHP 8.1 release.
45+
(#274 by @SimonFrings)
46+
347
## 1.9.0 (2021-08-03)
448

549
* Feature: Add new `SocketServer` and deprecate `Server` to avoid class name collisions.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,23 +1486,23 @@ $promise = $connector->connect('localhost:80');
14861486

14871487
## Install
14881488

1489-
The recommended way to install this library is [through Composer](https://getcomposer.org).
1489+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
14901490
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
14911491

14921492
This project follows [SemVer](https://semver.org/).
14931493
This will install the latest supported version:
14941494

14951495
```bash
1496-
$ composer require react/socket:^1.9
1496+
$ composer require react/socket:^1.10
14971497
```
14981498

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

15011501
This project aims to run on any platform and thus does not require any PHP
15021502
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and HHVM.
1503-
It's *highly recommended to use PHP 7+* for this project, partly due to its vast
1504-
performance improvements and partly because legacy PHP versions require several
1505-
workarounds as described below.
1503+
It's *highly recommended to use the latest supported PHP version* for this project,
1504+
partly due to its vast performance improvements and partly because legacy PHP
1505+
versions require several workarounds as described below.
15061506

15071507
Secure TLS connections received some major upgrades starting with PHP 5.6, with
15081508
the defaults now being more secure, while older versions required explicit
@@ -1538,7 +1538,7 @@ on affected versions.
15381538
## Tests
15391539

15401540
To run the test suite, you first need to clone this repo and then install all
1541-
dependencies [through Composer](https://getcomposer.org):
1541+
dependencies [through Composer](https://getcomposer.org/):
15421542

15431543
```bash
15441544
$ composer install
@@ -1547,15 +1547,15 @@ $ composer install
15471547
To run the test suite, go to the project root and run:
15481548

15491549
```bash
1550-
$ php vendor/bin/phpunit
1550+
$ vendor/bin/phpunit
15511551
```
15521552

15531553
The test suite also contains a number of functional integration tests that rely
15541554
on a stable internet connection.
15551555
If you do not want to run these, they can simply be skipped like this:
15561556

15571557
```bash
1558-
$ php vendor/bin/phpunit --exclude-group internet
1558+
$ vendor/bin/phpunit --exclude-group internet
15591559
```
15601560

15611561
## License

0 commit comments

Comments
 (0)
0