This is moderately messy. Process was principally: * xargs rg --files-with-matches '^use Title;' | grep 'php$' | \ xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1' * rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \ xargs rg --files-with-matches 'Title\b' | \ xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1' * composer fix Then manual fix-ups for a few files that don't have any use statements. Bug: T166010 Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
30 lines
889 B
PHP
30 lines
889 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
use File;
|
|
use MediaWiki\Title\Title;
|
|
use Parser;
|
|
|
|
/**
|
|
* This is a hook handler interface, see docs/Hooks.md.
|
|
* Use the hook name "ParserMakeImageParams" to register handlers implementing this interface.
|
|
*
|
|
* @stable to implement
|
|
* @ingroup Hooks
|
|
*/
|
|
interface ParserMakeImageParamsHook {
|
|
/**
|
|
* This hook is called before the parser generates an image link, use this
|
|
* to modify the parameters of the image.
|
|
*
|
|
* @since 1.35
|
|
*
|
|
* @param Title $title Title object representing the file
|
|
* @param File $file File object that will be used to create the image
|
|
* @param array &$params Two-dimensional array of parameters
|
|
* @param Parser $parser Parser object that called the hook
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
*/
|
|
public function onParserMakeImageParams( $title, $file, &$params, $parser );
|
|
}
|