Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4 Support #396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
php: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} Test
Expand Down
10 changes: 5 additions & 5 deletions src/Pusher.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Pusher implements LoggerAwareInterface, PusherInterface
*
* @throws PusherException Throws exception if any required dependencies are missing
*/
public function __construct(string $auth_key, string $secret, string $app_id, array $options = [], ClientInterface $client = null)
public function __construct(string $auth_key, string $secret, string $app_id, array $options = [], ?ClientInterface $client = null)
{
$this->check_compatibility();

Expand Down Expand Up @@ -287,7 +287,7 @@ public static function build_auth_query_params(
string $request_path,
array $query_params = [],
string $auth_version = '1.0',
string $auth_timestamp = null
?string $auth_timestamp = null
): array {
$params = [];
$params['auth_key'] = $auth_key;
Expand Down Expand Up @@ -884,7 +884,7 @@ public function authenticateUser(string $socket_id, array $user_data): string
* @return string Json encoded authentication string.
* @throws PusherException Throws exception if $channel is invalid or above or $socket_id is invalid
*/
public function authorizeChannel(string $channel, string $socket_id, string $custom_data = null): string
public function authorizeChannel(string $channel, string $socket_id, ?string $custom_data = null): string
{
$this->validate_channel($channel);
$this->validate_socket_id($socket_id);
Expand Down Expand Up @@ -949,15 +949,15 @@ public function authorizePresenceChannel(string $channel, string $socket_id, str
/**
* @deprecated in favour of authorizeChannel
*/
public function socketAuth(string $channel, string $socket_id, string $custom_data = null): string
public function socketAuth(string $channel, string $socket_id, ?string $custom_data = null): string
{
return $this->authorizeChannel($channel, $socket_id, $custom_data);
}

/**
* @deprecated in favour of authorizeChannel
*/
public function socket_auth(string $channel, string $socket_id, string $custom_data = null): string
public function socket_auth(string $channel, string $socket_id, ?string $custom_data = null): string
{
return $this->authorizeChannel($channel, $socket_id, $custom_data);
}
Expand Down
4 changes: 2 additions & 2 deletions src/PusherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function get(string $path, array $params = [], bool $associative = false)
* @return string Json encoded authentication string.
* @throws PusherException Throws exception if $channel is invalid or above or $socket_id is invalid
*/
public function socketAuth(string $channel, string $socket_id, string $custom_data = null): string;
public function socketAuth(string $channel, string $socket_id, ?string $custom_data = null): string;

/**
* Creates a presence signature (an extension of socket signing).
Expand Down Expand Up @@ -229,7 +229,7 @@ public function get_users_info(string $channel): object;
* @return string Json encoded authentication string.
* @throws PusherException Throws exception if $channel is invalid or above or $socket_id is invalid
*/
public function socket_auth(string $channel, string $socket_id, string $custom_data = null): string;
public function socket_auth(string $channel, string $socket_id, ?string $custom_data = null): string;

/**
* Creates a presence signature (an extension of socket signing).
Expand Down