Skip to content

Commit 94a1b01

Browse files
committed
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
1 parent 7c49b80 commit 94a1b01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Core/Config/ReportWidthTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public static function setStaticProperty($name, $value)
285285
{
286286
$property = new ReflectionProperty('PHP_CodeSniffer\Config', $name);
287287
$property->setAccessible(true);
288-
$property->setValue($value);
288+
$property->setValue(null, $value);
289289
$property->setAccessible(false);
290290

291291
}//end setStaticProperty()

0 commit comments

Comments
 (0)