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

vmarchuk created an issue. See original summary.

vmarchuk’s picture

Assigned: vmarchuk » Unassigned
Status: Active » Needs review
amatzies’s picture

Status: Needs review » Reviewed & tested by the community

This 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.