squizlabs / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
10.66k stars 1.48k forks source link

PHP 8.3 | ReportWidthTest: fix deprecation notices for ReflectionProperty::setValue() #3858

Closed jrfnl closed 9 months ago

jrfnl commented 1 year ago

Description

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 the Core/Config/ReportWidthTest to pass null as the "object" for setting the value of a static property to make the method call cross-version compatible.

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

Suggested changelog entry

N/A test only change

Types of changes

jrfnl commented 9 months ago

Closing as replaced by https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/77

jrfnl commented 8 months ago

FYI: this fix is included in today's PHP_CodeSniffer 3.8.0 release.

As per #3932, development on PHP_CodeSniffer will continue in the PHPCSStandards/PHP_CodeSniffer repository. If you want to stay informed, you may want to start "watching" that repo (or watching releases from that repo).