Fix PHP 8.4 implicit nullable deprecation

Created on 22 November 2024, 5 months ago

Problem/Motivation

PHP 8.4 has been released, and this module is triggering a "use explicit nullable type" deprecation.

This is part of Drupal's coding standards now, but since the issues to fix phpcs in this module have stalled, I'm opening up this issue to fix this single deprecation to avoid the warnings on PHP 8.4.

After updating to PHP 8.4:

Deprecated: Drupal\pathauto\Commands\PathautoCommands::generateAliases(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/pathauto/src/Commands/PathautoCommands.php on line 89
PHP Deprecated:  Drupal\pathauto\Commands\PathautoCommands::deleteAliases(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/pathauto/src/Commands/PathautoCommands.php on line 135

Deprecated: Drupal\pathauto\Commands\PathautoCommands::deleteAliases(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/pathauto/src/Commands/PathautoCommands.php on line 135
PHP Deprecated:  Drupal\pathauto\AliasStorageHelper::__construct(): Implicitly marking parameter $entity_type_manager as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/pathauto/src/AliasStorageHelper.php on line 79

Deprecated: Drupal\pathauto\AliasStorageHelper::__construct(): Implicitly marking parameter $entity_type_manager as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/pathauto/src/AliasStorageHelper.php on line 79
PHP Deprecated:  Consolidation\AnnotatedCommand\State\StateHelper::injectIntoCallbackObject(): Implicitly marking parameter $output as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/consolidation/annotated-command/src/State/StateHelper.php on line 20
🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇯🇵Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024