$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() {
$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 . '" (' .
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 <https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/" .
+ "Writing_unit_tests_for_extensions#Register_your_tests> for more details.\n"
+ );
+ }
foreach ( $handlers as $func ) {
if ( $func instanceof Closure ) {
$this->error( "Error: Closures cannot be converted to JSON. " .