Problem/Motivation
When updating from php 8.3 > 8.4 on a Drupal 11.3 site, all Drush commands throw multiple deprecation warnings:
Deprecated: Drupal\trailing_slash\PathProcessor\TrailingSlashOutboundPathProcessor::processOutbound(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/trailing_slash/src/PathProcessor/TrailingSlashOutboundPathProcessor.php on line 76
Deprecated: Drupal\trailing_slash\PathProcessor\TrailingSlashOutboundPathProcessor::processOutbound(): Implicitly marking parameter $bubbleable_metadata as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/trailing_slash/src/PathProcessor/TrailingSlashOutboundPathProcessor.php on line 76
Deprecated: Drupal\trailing_slash\PathProcessor\TrailingSlashOutboundPathProcessor::isPathWithTrailingSlash(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/trailing_slash/src/PathProcessor/TrailingSlashOutboundPathProcessor.php on line 86
Deprecated: Drupal\trailing_slash\PathProcessor\TrailingSlashOutboundPathProcessor::isPathWithTrailingSlash(): Implicitly marking parameter $bubbleable_metadata as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/trailing_slash/src/PathProcessor/TrailingSlashOutboundPathProcessor.php on line 86
Steps to reproduce
- Install Drupal 11.3 on a server with php 8.3
- Install the trailing slash module
- Update php from 8.3 > 8.4
- in the command line, run a Drush command, like
$ drush cr
Proposed resolution
Update module code to reflect php 8.4 best practice, to quash deprecation warnings.
Comments
Comment #2
timfletcher commentedComment #5
yusuf_khan commentedhttps://git.drupalcode.org/project/trailing_slash/-/merge_requests/17 - please review the MR that fix the deprecation warnings
Comment #6
yusuf_khan commented@maintainer any update