Skip to content

Commit

Permalink
Prepare v1.10.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Nov 29, 2021
1 parent 2fde15a commit d132fde
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 8 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Changelog

## 1.10.0 (2021-09-13)

* Feature: Support listening on existing file descriptors (FDs) with `SocketServer`.
(#269 by @clue)

```php
$socket = new React\Socket\SocketSever('php://fd/3');
```

This is particularly useful when using
[systemd socket activation](https://www.freedesktop.org/software/systemd/man/systemd.socket.html)
like this:

```bash
$ systemd-socket-activate -l 8000 php examples/03-http-server.php php://fd/3
```

* Feature: Improve error messages for failed connection attempts with `errno` and `errstr`.
(#265, #266, #267, #270 and #271 by @clue and #268 by @SimonFrings)

All error messages now always include the appropriate `errno` and `errstr` to
give more details about the error reason when available. Along with these
error details exposed by the underlying system functions, it will also
include the appropriate error constant name (such as `ECONNREFUSED`) when
available. Accordingly, failed TCP/IP connections will now report the actual
underlying error condition instead of a generic "Connection refused" error.
Higher-level error messages will now consistently report the connection URI
scheme and hostname used in all error messages.

For most common use cases this means that simply reporting the `Exception`
message should give the most relevant details for any connection issues:

```php
$connector = new React\Socket\Connector();
$connector->connect($uri)->then(function (React\Socket\ConnectionInterface $conn) {
// …
}, function (Exception $e) {
echo 'Error:' . $e->getMessage() . PHP_EOL;
});
```

* Improve test suite, test against PHP 8.1 release.
(#274 by @SimonFrings)

## 1.9.0 (2021-08-03)

* Feature: Add new `SocketServer` and deprecate `Server` to avoid class name collisions.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1486,23 +1486,23 @@ $promise = $connector->connect('localhost:80');

## Install

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

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

```bash
$ composer require react/socket:^1.9
$ composer require react/socket:^1.10
```

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

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

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

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

```bash
$ composer install
Expand All @@ -1547,15 +1547,15 @@ $ composer install
To run the test suite, go to the project root and run:

```bash
$ php vendor/bin/phpunit
$ vendor/bin/phpunit
```

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

```bash
$ php vendor/bin/phpunit --exclude-group internet
$ vendor/bin/phpunit --exclude-group internet
```

## License
Expand Down

0 comments on commit d132fde

Please sign in to comment.