From 300d6d6ee92a9c26ab13fbdcc94bdb667f67d19a Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 21 Jul 2023 00:21:32 +0200 Subject: [PATCH] PHP 8.3 | ReportWidthTest: fix deprecation notices for ReflectionProperty::setValue() 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 --- tests/Core/Config/ReportWidthTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Core/Config/ReportWidthTest.php b/tests/Core/Config/ReportWidthTest.php index aa5375a42c..144b00caa6 100644 --- a/tests/Core/Config/ReportWidthTest.php +++ b/tests/Core/Config/ReportWidthTest.php @@ -295,7 +295,7 @@ public static function setStaticProperty($name, $value) { $property = new ReflectionProperty('PHP_CodeSniffer\Config', $name); $property->setAccessible(true); - $property->setValue($value); + $property->setValue(null, $value); $property->setAccessible(false); }//end setStaticProperty()