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

  1. Install the module version 3.0.3 in a Drupal environment running PHP 8.4 or higher.
  2. Enable deprecated error logging in PHP configuration (e.g., error_reporting(E_ALL | E_DEPRECATED)).
  3. Enable the "ordonnable" settings on a vocabulary.
  4. 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

Command icon 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

johnatas created an issue. See original summary.

johnatas’s picture

Status: Active » Needs work
johnatas’s picture

Status: Needs work » Needs review

davps’s picture

Status: Needs review » Fixed

@johnatas, thanks for report and fix.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • davps committed 7751d833 on 3.x authored by johnatas
    Issue #3569632 by johnatas: Fix implicit nullable parameter for PHP 8.4...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.