reactphp / socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP.
https://reactphp.org/socket/
MIT License
1.2k stars 156 forks source link

[1.x] Improve PHP 8.4+ support by avoiding implicitly nullable types #318

Closed clue closed 1 month ago

clue commented 2 months ago

This changeset backports #317 from 3.x to 1.x to improve PHP 8.4+ support by avoiding implicitly nullable types as discussed in https://github.com/reactphp/promise/pull/260. The same idea applies, but v1 requires manual type checks to support legacy PHP versions as the nullable type syntax requires PHP 7.1+ otherwise.

Builds on top of #317, #310 and #260, https://github.com/reactphp/promise/pull/260, https://github.com/reactphp/dns/pull/224, https://github.com/reactphp/stream/pull/179, https://github.com/reactphp/async/pull/87 and https://github.com/reactphp/promise-timer/pull/70