Skip to content

Commit 065b2f1

Browse files
PHP 8.4 support (#21)
* PHP 8.4 support * Update CHANGELOG.md * Fixes
1 parent e8a4f34 commit 065b2f1

9 files changed

+15
-7
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
14+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1515

1616
steps:
1717
- name: Checkout Code

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# CHANGELOG
22

33

4+
## 1.7.0 (UPCOMING)
5+
6+
* Add `Client::getSocketResource` method
7+
* Add support for PHP 8.4
8+
9+
410
## 1.6.0 (2024-03-17)
511

612
* Add support for PHP 8.3

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" beStrictAboutOutputDuringTests="true" beStrictAboutTestsThatDoNotTestAnything="true" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" beStrictAboutOutputDuringTests="true" beStrictAboutTestsThatDoNotTestAnything="true" bootstrap="vendor/autoload.php" colors="true" displayDetailsOnTestsThatTriggerDeprecations="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd">
33
<testsuites>
44
<testsuite name="Test Suite">
55
<directory suffix="Test.php">./tests</directory>

src/Connection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public function getClientApplication()
246246
*
247247
* @return bool
248248
*/
249-
public function close(int $code = Protocol::CLOSE_NORMAL, string $reason = null): bool
249+
public function close(int $code = Protocol::CLOSE_NORMAL, ?string $reason = null): bool
250250
{
251251
try {
252252
if (!$this->handshaked) {

src/Exception/BadRequestException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class BadRequestException extends HandshakeException
99
{
10-
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
10+
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
1111
{
1212
parent::__construct($message, $code ?? Protocol::HTTP_BAD_REQUEST, $previous);
1313
}

src/Exception/CloseException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class CloseException extends WrenchException
1313
{
14-
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
14+
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
1515
{
1616
parent::__construct($message, $code ?? Protocol::CLOSE_UNEXPECTED, $previous);
1717
}

src/Exception/HandshakeException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class HandshakeException extends WrenchException
1010
{
11-
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
11+
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
1212
{
1313
parent::__construct($message, $code ?? Protocol::HTTP_SERVER_ERROR, $previous);
1414
}

src/Exception/InvalidOriginException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class InvalidOriginException extends HandshakeException
1212
{
13-
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
13+
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
1414
{
1515
parent::__construct($message, $code ?? Protocol::HTTP_FORBIDDEN, $previous);
1616
}

tests/Util/SslTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
class SslTest extends BaseTest
88
{
9+
private $tmp;
10+
911
public function setUp(): void
1012
{
1113
parent::setUp();

0 commit comments

Comments
 (0)