X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FconvertExtensionToRegistration.php;h=0554949500cc0aa11d3c7ee74dd756f4ccfe2dee;hb=870eaf7c95b407f139c441f2528b2132fd9015a8;hp=7c87e1012648b30c65dc4c973d3b30fa444670b7;hpb=476a926d79225402de952ec6977d2260e356d2f8;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/convertExtensionToRegistration.php b/maintenance/convertExtensionToRegistration.php index 7c87e10126..0554949500 100644 --- a/maintenance/convertExtensionToRegistration.php +++ b/maintenance/convertExtensionToRegistration.php @@ -66,7 +66,7 @@ class ConvertExtensionToRegistration extends Maintenance { $processor = new ReflectionClass( 'ExtensionProcessor' ); $settings = $processor->getProperty( 'globalSettings' ); $settings->setAccessible( true ); - return $settings->getValue() + $this->formerGlobals; + return array_merge( $settings->getValue(), $this->formerGlobals ); } public function execute() { @@ -120,7 +120,7 @@ class ConvertExtensionToRegistration extends Maintenance { $this->hasWarning = true; } elseif ( strpos( $name, $configPrefix ) === 0 ) { // Most likely a config setting - $this->json['config'][substr( $name, strlen( $configPrefix ) )] = $value; + $this->json['config'][substr( $name, strlen( $configPrefix ) )] = [ 'value' => $value ]; } elseif ( $configPrefix !== 'wg' && strpos( $name, 'wg' ) === 0 ) { // Warn about this $this->output( 'Warning: Skipped global "' . $name . '" (' . @@ -230,6 +230,13 @@ class ConvertExtensionToRegistration extends Maintenance { public function handleHooks( $realName, $value ) { foreach ( $value as $hookName => &$handlers ) { + if ( $hookName === 'UnitTestsList' ) { + $this->output( "Note: the UnitTestsList hook is no longer necessary as " . + "long as your tests are located in the \"tests/phpunit/\" directory. " . + "Please see for more details.\n" + ); + } foreach ( $handlers as $func ) { if ( $func instanceof Closure ) { $this->error( "Error: Closures cannot be converted to JSON. " .