This issue was first brought up in #3209769: [meta] Make D7 rules compatible with PHP 8.0/8.1.

In the D7 version of Rules there are several examples of required parameters following optional parameters in function declaration. This is deprecated in PHP 8.0. Now that Drupal core supports PHP 8.0, we can begin to deal with these issues in Rules.

These instances of required parameters following optional parameters can easily be fixed by removing the default values for parameters that are before parameters that do not have defaults.

CommentFileSizeAuthor
#3 3209769-4.patch4.84 KBtr

Comments

TR created an issue. See original summary.

TR credited Liam Morland.

tr’s picture

Status: Active » Needs review
StatusFileSize
new4.84 KB

This patch was contributed by @Liam Morland in #3209769: [meta] Make D7 rules compatible with PHP 8.0/8.1

tr’s picture

#3 didn't reduce the number of failed tests, but it did eliminate the deprecation failures caused by Rules. All the deprecation failures are now in the Entity API module.

  • TR committed b2c6e88 on 7.x-2.x authored by Liam Morland
    Issue #3210626 by Liam Morland: Required parameters following optional...
tr’s picture

Status: Needs review » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

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