PHP 8.3 | ReportWidthTest: fix deprecation notices for ReflectionProperty::setValue() by jrfnl · Pull Request #5984 · wp-cli/wp-cli

The ReflectionProperty::setValue() method supports three method signatures, two of which are deprecated as of PHP 8.3.

This adjusts the call to ReflectionProperty::setValue() in various methods in the UtilsTest class to pass null as the "object" for setting the value of a static property to make the method calls cross-version compatible.

Note: these deprecations were visible in the test summary, but the tests - as they currently are - are not set up correctly to fail builds on deprecation notices, which is probably why this went unnoticed.

Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#reflectionpropertysetvalue