firebase / php-jwt

PHP package for JWT
BSD 3-Clause "New" or "Revised" License
9.44k stars 1.27k forks source link

Deprecated Implicit Null Parameters #582

Open Zykaris opened 2 days ago

Zykaris commented 2 days ago

Obviously this is pretty new, but with the general release of PHP 8.4.1 today, implicit null parameters now raise warnings. These warnings all say something similar to the following:

PHP Deprecated: Firebase\JWT\JWT::decode(): Implicitly marking parameter $headers as nullable is deprecated, the explicit nullable type must be used instead

This occurs in--at least--the following places:

  1. src\JWK.php on line 55
  2. src\JWK.php on line 96
  3. src\JWT.php on line 96
  4. src\JWT.php on line 203
  5. src\JWT.php on line 204

Once Null is added to the type-hints, the library appears to work without issue.

sbuerk commented 7 hours ago

Should be aready fixed with https://github.com/firebase/php-jwt/pull/572 which is merged. Sadly, still a release is missing https://github.com/firebase/php-jwt/issues/578

I'd say this can be closed as duplicate of https://github.com/firebase/php-jwt/issues/570