PHP 8.4 | Fix implicitly nullable parameters by jrfnl · Pull Request #5982 · wp-cli/wp-cli
PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameters with a `null` default value, which are not explicitly declared as nullable. As the minimums supported PHP version of this code base is PHP 5.6, adding the nullability operator to the type declaration is not an option at this time. In this case, however, the parameter is found in the declaration of a `private` method, so removing the type declaration in favour of in-function type checking solves the deprecation without breaking BC (as `private`). Includes updating the documentation to match (where relevant, i.e. only existing documentation has been touched). Ref: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
jrfnl
deleted the
feature/php-8.4-fix-implicitly-nullable
branch
This was referenced
Sep 17, 2024This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters