Message: add strict type to protected Message::$language
[mediawiki.git] / tests / phpunit / MediaWikiDeprecatedConfigPHPUnitExtension.php
blob574d2be0771fa20485dd0d904a0cdc7ab870089f
1 <?php
3 use PHPUnit\Runner\BeforeFirstTestHook;
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;
14 $msg = <<<EOT
15 *******************************************************************************
16 DEPRECATED: The tests/phpunit/suite.xml config file has been deprecated. Use
17 phpunit.xml.dist instead.
18 *******************************************************************************
20 EOT;
22 fwrite( STDERR, $msg );