Description
From PHP8.4, a parameter that has null as a default value has to be typed as a nullable type: https://www.php.net/manual/en/migration84.deprecated.php
There are several places where method parameters take null as a default value but ? is missing.
Steps to reproduce
Instantiate RSAKey object for example:
bash-3.2$ php -a
Interactive shell
php > require 'vendor/autoload.php';
php > $key = new \SimpleJWT\Keys\RSAKey("{}", 'json');
PHP Deprecated: SimpleJWT\Keys\Key::toJWK(): Implicitly marking parameter $password as nullable is deprecated, the explicit nullable type must be used instead in /***/simplejwt/src/SimpleJWT/Keys/Key.php on line 237
Deprecated: SimpleJWT\Keys\Key::toJWK(): Implicitly marking parameter $password as nullable is deprecated, the explicit nullable type must be used instead in /***/simplejwt/src/SimpleJWT/Keys/Key.php on line 237
php >
Expected behaviour
Method is called without deprecation warning.
Environment
- Version: 1.0.2
- Server OS: Mac OS, Linux
- PHP: 8.4
- Packages: The same one as the master branch composer.json
Backtrace
Insert backtrace where relevant
Additional information
Any other information which you think would be useful in diagnosing the problem.
Description
From PHP8.4, a parameter that has
nullas a default value has to be typed as a nullable type: https://www.php.net/manual/en/migration84.deprecated.phpThere are several places where method parameters take
nullas a default value but?is missing.Steps to reproduce
Instantiate
RSAKeyobject for example:Expected behaviour
Method is called without deprecation warning.
Environment
Backtrace
Insert backtrace where relevant
Additional information
Any other information which you think would be useful in diagnosing the problem.