Needs review
Project:
Lightning Core
Version:
6.1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
2 Sep 2026 at 14:35 UTC
Updated:
7 Sep 2026 at 11:11 UTC
Jump to comment: Most recent
PHP 8.4 Compatibility: Fix Implicitly Nullable Parameter Deprecation in isViewing() Method
PHP 8.4 deprecates implicitly nullable parameters where a typed parameter has a default value of
NULL without explicitly declaring the parameter as nullable.
The following method contains an implicitly nullable parameter:
public static function isViewing(EntityInterface $entity, RouteMatchInterface $route_match = NULL) {
This results in the following PHP 8.4 deprecation warning:
Deprecated: Implicitly marking parameter $route_match as nullable is deprecated, the explicit nullable type must be used instead.
To ensure PHP 8.4 compatibility and remove the deprecation warning, the parameter type has been
updated to explicitly allow null.
public static function isViewing(EntityInterface $entity, RouteMatchInterface $route_match = NULL) {
public static function isViewing(EntityInterface $entity, ?RouteMatchInterface $route_match = NULL) {
Code Quality / PHP 8.4 Compatibility
Low Risk. This is a non-functional change that updates the method signature to comply with
PHP 8.4 requirements while preserving existing behaviour.
| Comment | File | Size | Author |
|---|---|---|---|
| lightning_core-php84-explicit-nullable-param.patch | 295 bytes | imran2734 |
Comments
Comment #2
imran2734 commented