This changeset refactors the internal Transaction to avoid assigning dynamic properties for PHP 8.2+ compatibility. On top of this, it makes the test suite compatible as well. PHP 8.2 is still under active development and has not reached feature freeze yet, so I've decided against adding it to the test matrix at this point in time. After applying this changeset, the tests work just fine. Prior to this, the test output can easily be checked like this:
$ docker run -it --rm -v `pwd`:/data --workdir=/data php:8.2-rc-cli vendor/bin/phpunit PHPUnit 9.5.21 #StandWithUkraine .....................................................E......... 63 / 737 ( 8%) ............................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 126 / 737 ( 17%) EEEEEEEEEEE..........................E......................... 189 / 737 ( 25%) ............................................................... 252 / 737 ( 34%) ............................................................... 315 / 737 ( 42%) ............................................................... 378 / 737 ( 51%) ............................................................... 441 / 737 ( 59%) .................................................E............. 504 / 737 ( 68%) ............................................................... 567 / 737 ( 76%) ........................................EEEEEEEEEEEEEEEEEEEEEEE 630 / 737 ( 85%) EEEEEEEEE...................................................... 693 / 737 ( 94%) ............................................ 737 / 737 (100%) Time: 00:02.522, Memory: 20.00 MB There were 81 errors: 1) React\Tests\Http\BrowserTest::testCancelGetRequestShouldCancelUnderlyingSocketConnection Creation of dynamic property React\Promise\Deferred::$numRequests is deprecated /data/src/Io/Transaction.php:77 /data/src/Browser.php:787 /data/src/Browser.php:113 /data/tests/BrowserTest.php:503 […] 81) React\Tests\Http\Io\TransactionTest::testCancelTransactionShouldCancelSendingPromise Creation of dynamic property React\Promise\Deferred::$numRequests is deprecated /data/src/Io/Transaction.php:77 /data/tests/Io/TransactionTest.php:829 ERRORS! Tests: 737, Assertions: 1617, Errors: 81.
Refs reactphp/dns#186, reactphp/dns#201 and reactphp/stream#165