Problem/Motivation

The OhUtility::flattenOccurrences() function throws deprecation notices on PHP 8.0

usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero

Steps to reproduce

Run unit tests on PHP 8.0

Proposed resolution

Spaceship operator

Remaining tasks

Review

User interface changes

N/A

API changes

N/A

Data model changes

N/A

CommentFileSizeAuthor
oh-php8-usort.patch435 bytesmstrelan

Comments

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review
acbramley’s picture

Status: Needs review » Reviewed & tested by the community

It returns -1, 0 or 1 when first element is respectively less than, equal to, or greater than second element.

TIL about 🚀

  • dpi committed 51eaafc on 2.x authored by mstrelan
    Issue #3220239 by mstrelan, acbramley: Returning bool from comparison...
dpi’s picture

Status: Reviewed & tested by the community » Fixed

To the moon! 🚀

Change will be found in next 2.0.0 release.

Status: Fixed » Closed (fixed)

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