PHP 7.2 changes that affect rules include:

fatal

  • declaration of child class method must be compatible with parent signature

This was handled in #2923477: PHP 7.x compatibility issue.

warnings

  • each() function is deprecated
CommentFileSizeAuthor
#2 rules-2952654-php-72.patch1.01 KBsolotandem

Comments

solotandem created an issue. See original summary.

solotandem’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB
tr’s picture

Status: Needs review » Reviewed & tested by the community

Yes, this works properly and it removes the use of each(), which is not allowed in PHP 7.2.

Remaining test failures for 7.2 are problems with core Drupal, which does not support PHP 7.2 yet.

tr’s picture

Bump.

Patch still applies and tests still pass.

pfrenssen’s picture

Maybe it would be a good idea to roll a new release for 7.x-2.x when this is in, a lot of people are now having to patch Rules to make their sites run on PHP 7.1 and higher. See for example the recent flurry of comments in #2923477: PHP 7.x compatibility issue.

tr’s picture

There have only been three commits to the 7.x-2.x branch since the last point release.

Perhaps we should have a tag or a meta issue to enumerate the issues that need to be finished for the next point release? By my count there are currently 14 RTBC issues, some of them quite old. Likewise, there are over 70 Needs review issues, many of which could be finished with help from the community. I think a significant number of these should make it into the next release, not just three minor issues. I find it odd that with 300,000 users there are so few willing to contribute in the issue queue.

It doesn't seem to me that it's too much to ask for some community participation in exchange for continued development, and vice verse. I don't know how to get the momentum going again - lack of maintainer participation in committing patches certainly discourages people from working hard on making the patches, but lack of any help from the community certainly discourages the maintainers from putting in the many needed hours of unappreciated and uncompensated time.

fago’s picture

Status: Reviewed & tested by the community » Fixed

thanks for the patch & suggestions.

As people noted correctly, I've only very limited time available for maintenance recently. So I'm looking only at RTBC issues and I was not really to get this done properly during the last months - so I'd be happy to accept help from someone else with experience maintaining modules! Howsowever, I try my best to get through RTBC issues regularly again at least.

Status: Fixed » Closed (fixed)

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

mrgoodfellow’s picture

I was able to apply this patch and it appears to have resolved things correctly. Can you let me know when this will get merged into the main branch and pushed into a new release?

tr’s picture

It's already in the main 7.x-2.x branch - that's what the commit shown in #7 indicates and what the "Fixed" status in #8 means. This patch is also already included in the most recent release 7.x-2.11, released on 18 May.