- Issue created by @mscieszka
- @mscieszka opened merge request.
There are 2 deprecation warnings when module is installed with PHP 8.4:
Deprecated function: Drupal\wpf\ImageFactory::createImageCopy(): Implicitly marking parameter $quality as nullable is deprecated, the explicit nullable type must be used instead w include() (linia 571 w /vendor/composer/ClassLoader.php)
Deprecated function: Drupal\wpf\ImageFactory::setDestinationUri(): Implicitly marking parameter $uri as nullable is deprecated, the explicit nullable type must be used instead w include() (linia 571 w /vendor/composer/ClassLoader.php)
composer require --dev --with-all-dependencies \
phpcompatibility/php-compatibility:10.x@dev \
dealerdirect/phpcodesniffer-composer-installer:^1.1
vendor/bin/phpcs -p -s \
--standard=PHPCompatibility \
--runtime-set testVersion 8.4 \
--extensions="inc,install,module,php,profile,theme" \
--ignore="core/lib/Drupal/Core/Test/*,*/tests/*" \
web/modules/contrib/wpf
Results in:
web/modules/contrib/wpf/src/ImageFactory.php
---
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---
165 | 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: $quality. (PHPCompatibility.FunctionDeclarations.RemovedImplicitlyNullableParam.Deprecated)
231 | 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: $uri. (PHPCompatibility.FunctionDeclarations.RemovedImplicitlyNullableParam.Deprecated)
Explicitly mark parameters as nullable.
Active
1.2
Code