Problem/Motivation
PHP 8.4 has deprecated implicit nullable types.
FILE: ../docroot/modules/contrib/acsf/src/AcsfMessageRest.php
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
---------------------------------------------------------------------------------------
29 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP
| | 8.4. Update the type to be explicitly nullable instead. Found
| | implicitly nullable parameter: $config.
29 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP
| | 8.4. Update the type to be explicitly nullable instead. Found
| | implicitly nullable parameter: $callback.
---------------------------------------------------------------------------------------
Steps to reproduce
composer require --dev --with-all-dependencies \
phpcompatibility/php-compatibility:10.x@dev \
dealerdirect/phpcodesniffer-composer-installer:^1.1
php bin/phpcs -p -s \
--standard=PHPCompatibility \
--runtime-set testVersion 8.4 \
--extensions="inc,install,module,php,profile,theme" \
docroot/modules/contrib/acsf
Proposed resolution
Explicitly declare the variable as nullable: https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated
Comments
Comment #4
jaswinsingh commented