Page MenuHomePhabricator

MWExceptionHandlerTest throws deprecation warnings on PHP 8.3
Closed, ResolvedPublic

Description

From a test run:

00:01:12.454 There were 19 errors:
00:01:12.454 
00:01:12.455 1) MWExceptionHandlerTest::testTraceFormatting
00:01:12.459 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.459 
00:01:12.459 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.459 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.459 
00:01:12.460 2) MWExceptionHandlerTest::testGetRedactedTrace
00:01:12.460 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.461 
00:01:12.461 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.461 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.461 
00:01:12.462 3) MWExceptionHandlerTest::testGetLogNormalMessage
00:01:12.462 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.462 
00:01:12.463 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.463 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.465 
00:01:12.466 4) MWExceptionHandlerTest::testGetLogContext
00:01:12.466 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.466 
00:01:12.466 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.466 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.466 
00:01:12.467 5) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #0 ('string', 'Exception', 'id')
00:01:12.480 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.480 
00:01:12.480 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.480 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.480 
00:01:12.480 6) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #1 ('string', 'Exception', 'file')
00:01:12.481 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.481 
00:01:12.486 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.486 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.486 
00:01:12.487 7) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #2 ('integer', 'Exception', 'line')
00:01:12.487 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.487 
00:01:12.487 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.487 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.487 
00:01:12.488 8) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #3 ('string', 'Exception', 'message')
00:01:12.488 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.488 
00:01:12.488 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.488 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.488 
00:01:12.488 9) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #4 ('NULL', 'Exception', 'url')
00:01:12.489 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.489 
00:01:12.489 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.489 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.489 
00:01:12.489 10) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #5 ('array', 'Exception', 'backtrace')
00:01:12.489 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.489 
00:01:12.489 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.490 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.490 
00:01:12.490 11) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #6 ('string', 'MWException', 'id')
00:01:12.490 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.490 
00:01:12.490 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.490 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.490 
00:01:12.490 12) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #7 ('string', 'MWException', 'file')
00:01:12.491 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.491 
00:01:12.491 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.491 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.491 
00:01:12.491 13) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #8 ('integer', 'MWException', 'line')
00:01:12.491 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.492 
00:01:12.492 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.492 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.492 
00:01:12.492 14) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #9 ('string', 'MWException', 'message')
00:01:12.492 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.492 
00:01:12.493 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.493 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.493 
00:01:12.493 15) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #10 ('NULL', 'MWException', 'url')
00:01:12.493 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.493 
00:01:12.493 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.494 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.494 
00:01:12.494 16) MWExceptionHandlerTest::testJsonserializeexceptionKeys with data set #11 ('array', 'MWException', 'backtrace')
00:01:12.494 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.494 
00:01:12.494 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.494 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.494 
00:01:12.494 17) MWExceptionHandlerTest::testJsonserializeexceptionBacktracingEnabled
00:01:12.495 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.495 
00:01:12.495 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.495 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:186
00:01:12.495 /workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:127
00:01:12.495 
00:01:12.495 18) MWExceptionHandlerTest::testJsonserializeexceptionBacktracingDisabled
00:01:12.495 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.495 
00:01:12.496 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.496 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:201
00:01:12.496 /workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:127
00:01:12.496 
00:01:12.496 19) MWExceptionHandlerTest::testValidCovers
00:01:12.496 Calling ReflectionProperty::setValue() with a 1st argument which is not null or an object is deprecated
00:01:12.496 
00:01:12.496 /workspace/src/vendor/wikimedia/testing-access-wrapper/src/TestingAccessWrapper.php:114
00:01:12.496 /workspace/src/tests/phpunit/unit/includes/exception/MWExceptionHandlerTest.php:26
00:01:12.496 
00:01:12.496 ERRORS!
00:01:12.497 Tests: 16878, Assertions: 191991, Errors: 19, Skipped: 16.

Event Timeline

Jdforrester-WMF renamed this task from MWExceptionHandlerTest throws on PHP 8.3 to MWExceptionHandlerTest throws deprecation warnings on PHP 8.3.Dec 13 2023, 6:27 PM

Change 982898 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] MWExceptionHandlerTest: Update for PHP 8.3 by avoiding settting static properties

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

It would also go away when updating TestingAccessWrapper due to fix of T352060

Change 982898 abandoned by Jforrester:

[mediawiki/core@master] MWExceptionHandlerTest: Update for PHP 8.3 by avoiding settting static properties

Reason:

Let's just use the TAW update instead.

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