PHP 8.4 deprecates implicitly nullable parameter types. When a typed parameter
has a default value of NULL without an explicit ? prefix on the type hint, PHP 8.4 emits a deprecation warning.
The following notices need to be fixed:
Deprecated: Drupal\reference_value_pair\Plugin\Field\FieldType\ReferenceValuePair::getPossibleValues(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/reference_value_pair/src/Plugin/Field/FieldType/ReferenceValuePair.php on line 473
Deprecated: Drupal\reference_value_pair\Plugin\Field\FieldType\ReferenceValuePair::getPossibleOptions(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/reference_value_pair/src/Plugin/Field/FieldType/ReferenceValuePair.php on line 480
Deprecated: Drupal\reference_value_pair\Plugin\Field\FieldType\ReferenceValuePair::getSettableValues(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/reference_value_pair/src/Plugin/Field/FieldType/ReferenceValuePair.php on line 487
Deprecated: Drupal\reference_value_pair\Plugin\Field\FieldType\ReferenceValuePair::getSettableOptions(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/reference_value_pair/src/Plugin/Field/FieldType/ReferenceValuePair.php on line 497
Comments
Comment #3
vmarchukComment #4
amatzies commentedThis patch works for me using PHP 8.4. The base class EntityReferenceItem changed the signature of these methods in both versions Drupal 11.3 and 10.6 as well.