PHP 8+ compatibility: ext/sockets tests
Closed this issue · 3 comments
thekid commented
See https://github.com/xp-framework/networking/runs/2107157661?check_suite_focus=true:
F unittest.TestAssertionFailed(test= peer.unittest.sockets.BSDSocketTest::setDomainOnConnected, time= 0.000 seconds) {
unittest.AssertionFailedError{ Expected lang.IllegalStateException not caught }
# ...
thekid commented
This also occurs on Windows (we simply did not have ext/sockets
loaded - neither on GitHub nor locally) while running the tests
thekid commented
This is due to https://www.php.net/manual/en/sockets.resources.php & https://www.php.net/manual/de/class.socket.php: A fully opaque class which replaces Socket resources as of PHP 8.0.0. This also causes the Object of class Socket could not be converted to int warnings seen here. See also https://bugs.php.net/bug.php?id=80723
thekid commented
Works again, see https://github.com/xp-framework/networking/actions/runs/651781399