Skip to content

Commit

Permalink
PHP 8.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Nov 6, 2024
1 parent 5b9a4d8 commit d30d4df
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout Code
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# CHANGELOG


## 1.6.1 (UPCOMING)

* Add support for PHP 8.4


## 1.6.0 (2024-03-17)

* Add support for PHP 8.3
Expand Down
2 changes: 1 addition & 1 deletion src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function getClientApplication()
*
* @return bool
*/
public function close(int $code = Protocol::CLOSE_NORMAL, string $reason = null): bool
public function close(int $code = Protocol::CLOSE_NORMAL, ?string $reason = null): bool
{
try {
if (!$this->handshaked) {
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/BadRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class BadRequestException extends HandshakeException
{
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
{
parent::__construct($message, $code ?? Protocol::HTTP_BAD_REQUEST, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/CloseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class CloseException extends WrenchException
{
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
{
parent::__construct($message, $code ?? Protocol::CLOSE_UNEXPECTED, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/HandshakeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class HandshakeException extends WrenchException
{
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
{
parent::__construct($message, $code ?? Protocol::HTTP_SERVER_ERROR, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidOriginException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class InvalidOriginException extends HandshakeException
{
public function __construct(string $message = '', int $code = null, Throwable $previous = null)
public function __construct(string $message = '', ?int $code = null, ?Throwable $previous = null)
{
parent::__construct($message, $code ?? Protocol::HTTP_FORBIDDEN, $previous);
}
Expand Down

0 comments on commit d30d4df

Please sign in to comment.