Debian Codegraph @

tests/phpunit/MediaWikiDeprecatedConfigPHPUnitExtension.php

raw symbols SCIP
1 <?php
2
3 use PHPUnit\Runner\BeforeFirstTestHook;
4
5 /**
6 * PHPUnit extension temporarily used to emit a deprecation notice when suite.xml is used
7 */
8 class MediaWikiDeprecatedConfigPHPUnitExtension implements BeforeFirstTestHook {
9 public function executeBeforeFirstTest(): void {
10 if ( defined( 'PHPUNIT_LEGACY_ENTRYPOINT' ) ) {
11 // A deprecation notice was already emitted by phpunit.php, no need to add another one.
12 return;
13 }
14 $msg = <<<EOT
15 *******************************************************************************
16 DEPRECATED: The tests/phpunit/suite.xml config file has been deprecated. Use
17 phpunit.xml.dist instead.
18 *******************************************************************************
19
20 EOT;
21
22 fwrite( STDERR, $msg );
23 }
24 }