Steps to replicate the issue (include links if applicable):
- In a fresh directory, run composer require wikimedia/testing-access-wrapper
- Create the following test file:
<?php use Wikimedia\TestingAccessWrapper; require './vendor/autoload.php'; error_reporting( E_ALL ); class Foo { private static $staticField; } $wrapper = TestingAccessWrapper::newFromClass( Foo::class ); $wrapper->staticField = true;
- Run the test file with PHP 8.3.
What happens?:
PHP Deprecated: Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated in /tmp/test/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php on line 114
What should have happened instead?:
No output.
Software version (skip for WMF-hosted wikis like Wikipedia):
wikimedia/testing-access-wrapper 2.0.0
Other information (browser name/version, screenshots, etc.):
N/A