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: Implicitly nullable parameters deprecated #72

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 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"require": {
"php": ">=5.4.2",
"php": ">=7.1",
"guzzlehttp/psr7": "^2 || ^1.7"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Handshake/ClientNegotiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ClientNegotiator {
*/
private $defaultHeader;

function __construct(PermessageDeflateOptions $perMessageDeflateOptions = null) {
function __construct(?PermessageDeflateOptions $perMessageDeflateOptions = null) {
$this->verifier = new ResponseVerifier;

$this->defaultHeader = new Request('GET', '', [
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/Frame.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ class Frame implements FrameInterface {
* @param string|null $payload
* @param bool $final
* @param int $opcode
* @param callable<\UnderflowException> $ufExceptionFactory
* @param callable<\UnderflowException>|null $ufExceptionFactory
*/
public function __construct($payload = null, $final = true, $opcode = 1, callable $ufExceptionFactory = null) {
public function __construct($payload = null, $final = true, $opcode = 1, ?callable $ufExceptionFactory = null) {
$this->ufeg = $ufExceptionFactory ?: static function($msg = '') {
return new \UnderflowException($msg);
};
Expand Down
6 changes: 3 additions & 3 deletions src/Messaging/MessageBuffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ class MessageBuffer {
function __construct(
CloseFrameChecker $frameChecker,
callable $onMessage,
callable $onControl = null,
?callable $onControl = null,
$expectMask = true,
$exceptionFactory = null,
$maxMessagePayloadSize = null, // null for default - zero for no limit
$maxFramePayloadSize = null, // null for default - zero for no limit
callable $sender = null,
PermessageDeflateOptions $permessageDeflateOptions = null
?callable $sender = null,
?PermessageDeflateOptions $permessageDeflateOptions = null
) {
$this->closeFrameChecker = $frameChecker;
$this->checkForMask = (bool)$expectMask;
Expand Down