Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
jobs:
PHPUnit:
name: PHPUnit (PHP ${{ matrix.php }})
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
strategy:
matrix:
php:
- 8.6
- 8.5
- 8.4
- 8.3
Expand All @@ -27,7 +28,7 @@ jobs:
- 5.4
- 5.3
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -41,10 +42,10 @@ jobs:

PHPUnit-hhvm:
name: PHPUnit (HHVM)
runs-on: ubuntu-22.04
runs-on: ubuntu-26.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
- name: Run hhvm composer.phar install
uses: docker://hhvm/hhvm:3.30-lts-latest
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"fig/http-message-util": "^1.1",
"psr/http-message": "^2.0 || ^1.0",
"react/event-loop": "^1.2",
"react/promise": "^3.2 || ^2.3 || ^1.2.1",
"react/event-loop": "^1.6",
"react/promise": "^3.3 || ^2.3 || ^1.2.1",
"react/socket": "^1.16",
"react/stream": "^1.4"
},
Expand Down
30 changes: 30 additions & 0 deletions tests/FunctionalHttpServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ public function testSecureHttpsOnRandomPort()
)));
$http->listen($socket);

// clear OpenSSL errors from closing the server side before the client reads,
// as legacy PHP < 7.2 does not (https://bugs.php.net/bug.php?id=78775)
$socket->on('connection', function (ConnectionInterface $conn) {
$conn->on('close', function () {
Loop::futureTick(function () {
while (openssl_error_string() !== false);
});
});
});

$result = $connector->connect($socket->getAddress())->then(function (ConnectionInterface $conn) {
$conn->write("GET / HTTP/1.0\r\nHost: " . noScheme($conn->getRemoteAddress()) . "\r\n\r\n");

Expand Down Expand Up @@ -172,6 +182,16 @@ public function testSecureHttpsReturnsData()
)));
$http->listen($socket);

// clear OpenSSL errors from closing the server side before the client reads,
// as legacy PHP < 7.2 does not (https://bugs.php.net/bug.php?id=78775)
$socket->on('connection', function (ConnectionInterface $conn) {
$conn->on('close', function () {
Loop::futureTick(function () {
while (openssl_error_string() !== false);
});
});
});

$connector = new Connector(array(
'tls' => array('verify_peer' => false)
));
Expand Down Expand Up @@ -210,6 +230,16 @@ public function testSecureHttpsOnRandomPortWithoutHostHeaderUsesSocketUri()
)));
$http->listen($socket);

// clear OpenSSL errors from closing the server side before the client reads,
// as legacy PHP < 7.2 does not (https://bugs.php.net/bug.php?id=78775)
$socket->on('connection', function (ConnectionInterface $conn) {
$conn->on('close', function () {
Loop::futureTick(function () {
while (openssl_error_string() !== false);
});
});
});

$result = $connector->connect($socket->getAddress())->then(function (ConnectionInterface $conn) {
$conn->write("GET / HTTP/1.0\r\n\r\n");

Expand Down
2 changes: 1 addition & 1 deletion tests/Io/AbstractMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MessageMock extends AbstractMessage
*/
public function __construct($protocolVersion, array $headers, StreamInterface $body)
{
return parent::__construct($protocolVersion, $headers, $body);
parent::__construct($protocolVersion, $headers, $body);
}
}

Expand Down