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: /src/Form/FieldValidationRuleDeleteForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 59 | 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:
    |         | $field_validation_rule_set.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /src/Form/FieldValidationRuleEditForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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:
    |         | $field_validation_rule_set.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /src/Form/FieldValidationRuleFormBase.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 114 | 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:
     |         | $field_validation_rule_set.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /src/Form/FieldValidationRuleAddForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 53 | 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:
    |         | $field_validation_rule_set.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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

enchufe created an issue. See original summary.

enchufe’s picture

Assigned: enchufe » Unassigned
Status: Needs work » Needs review
andreasderijcke’s picture

Status: Needs review » Reviewed & tested by the community

Fixes all the warnings on my test case. Can't spot anything amiss in the MR.

orkutmuratyilmaz’s picture

I can confirm that the warnings are gone, after using the MR as a patch, in my local environment too.

Any chance for the merge?

abhisekmazumdar made their first commit to this issue’s fork.

abhisekmazumdar’s picture

Status: Reviewed & tested by the community » Fixed

Thank You everyone this has been merged and a beta release will be made after #3433082: Add Gitlab CI.

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.

orkutmuratyilmaz’s picture

@abhisekmazumdar, thanks for the fix:)

Status: Fixed » Closed (fixed)

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