Page MenuHomePhabricator

Fix FindDeprecatedTest.php to pass on PHP 8.2, 8.3, 8.4, and 8.5
Closed, ResolvedPublic

Description

Follows-up T374832: findDeprecated.php does not correctly label hard-deprecated code which added a unit test in 2024 for maintenance/findDeprecated.php that is skipped on PHP 8.2 and higher.

We removed support for PHP 8.1 in Dec 2025 (T358666), which means this test is now effectively unconditionally disabled.

$ composer phpunit -- --verbose tests/phpunit/maintenance/FindDeprecatedTest.php

PHPUnit 9.6.34 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.5.0
Configuration: /mediawiki/phpunit.xml

S.                                                                  2 / 2 (100%)

Time: 00:00.086, Memory: 55.70 MB

There was 1 skipped test:

1) MediaWiki\Tests\Maintenance\FindDeprecatedTest::testExecute
PHP 8.2 isn't supported for this test

/mediawiki/tests/phpunit/maintenance/FindDeprecatedTest.php:36


OK, but incomplete, skipped, or risky tests!
Tests: 2, Assertions: 2, Skipped: 1.

Event Timeline

Change #1270271 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] maintenance: Re-enable FindDeprecatedTest and fix for PHP 8.2+

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

Krinkle triaged this task as Medium priority.Apr 13 2026, 7:19 AM

Change #1270271 merged by jenkins-bot:

[mediawiki/core@master] maintenance: Re-enable FindDeprecatedTest and fix for PHP 8.2+

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