PHP 8.4 implicit nullable deprecation

Created on 25 February 2025, 13 days 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:

FILE: /tests/modules/readonly_field_widget_test/readonly_field_widget_test.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 16 | 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: $items.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇪🇸Spain enchufe Spain

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