Page MenuHomePhabricator

Calling ReflectionProperty::setValue() for static values is deprecated in php8.3 (used by core's session tests)
Closed, ResolvedPublic

Description

session tests should use TestingAccessWrapper::newFromClass instead of own ReflectionProperty::setValue to benefit from the fix T352060

There were 8 errors:

1) MediaWiki\Session\PHPSessionHandlerTest::testEnableFlags
Calling ReflectionProperty::setValue() with a single argument is deprecated

/workspace/src/vendor/wikimedia/scoped-callback/src/ScopedCallback.php:102

Caused by
Calling ReflectionProperty::setValue() with a single argument is deprecated

/workspace/src/tests/phpunit/includes/session/PHPSessionHandlerTest.php:45

2) MediaWiki\Session\PHPSessionHandlerTest::testInstall
Calling ReflectionProperty::setValue() with a single argument is deprecated

/workspace/src/tests/phpunit/includes/session/PHPSessionHandlerTest.php:67

5) MediaWiki\Session\PHPSessionHandlerTest::testDisabled with data set #0 ('open', array('', ''))
Calling ReflectionProperty::setValue() with a single argument is deprecated

/workspace/src/tests/phpunit/includes/session/PHPSessionHandlerTest.php:318

6) MediaWiki\Session\PHPSessionHandlerTest::testDisabled with data set #1 ('read', array(''))
Calling ReflectionProperty::setValue() with a single argument is deprecated

/workspace/src/tests/phpunit/includes/session/PHPSessionHandlerTest.php:318

7) MediaWiki\Session\PHPSessionHandlerTest::testDisabled with data set #2 ('write', array('', ''))
Calling ReflectionProperty::setValue() with a single argument is deprecated

/workspace/src/tests/phpunit/includes/session/PHPSessionHandlerTest.php:318

8) MediaWiki\Session\PHPSessionHandlerTest::testDisabled with data set #3 ('destroy', array(''))
Calling ReflectionProperty::setValue() with a single argument is deprecated

/workspace/src/tests/phpunit/includes/session/PHPSessionHandlerTest.php:318

Event Timeline

Change 980933 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/980933

Change 980933 merged by jenkins-bot:

[mediawiki/core@master] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/980933

Change #1017403 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_41] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/1017403

Change #1017403 merged by jenkins-bot:

[mediawiki/core@REL1_41] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/1017403

Change #1017434 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_40] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/1017434

Change #1017440 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/core@REL1_39] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/1017440

Change #1017440 merged by jenkins-bot:

[mediawiki/core@REL1_39] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/1017440

Change #1017434 merged by jenkins-bot:

[mediawiki/core@REL1_40] tests: Use TestingAccessWrapper::newFromClass in session tests

https://gerrit.wikimedia.org/r/1017434