Problem/Motivation
The module generates a PHP deprecation warning related to implicitly marking a parameter as nullable. These warnings indicate that the codebase needs to be updated to use explicit nullable types to comply with modern PHP standards. This causes noise in logs and may lead to compatibility issues with newer PHP versions.
Steps to reproduce
- Install the module version 3.0.3 in a Drupal environment running PHP 8.4 or higher.
- Enable deprecated error logging in PHP configuration (e.g.,
error_reporting(E_ALL | E_DEPRECATED)). - Enable the "ordonnable" settings on a vocabulary.
- Go to the "Order" page of a term in the vocabulary.
The following warning appears:
Deprecated: Drupal\nodeorder\NodeOrderListBuilder::createInstance(): Implicitly marking parameter $taxonomy_term as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/nodeorder/src/NodeOrderListBuilder.php on line 79
Proposed resolution
Use an explicit nullable type for the Term parameter.
Issue fork nodeorder-3569632
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
johnatas commentedComment #4
johnatas commentedComment #6
davps commented@johnatas, thanks for report and fix.