+ if ( substr( $filename, 0, 6 ) === 'alias:' ) {
+ // Supported alias formats:
+ // - No deprecation warning: alias:MyNewClassName
+ // - Deprecated in MediaWiki 1.1: alias:MyNewClassName?v=1.1
+ // - Deprecated in MyExtension 1.1: alias:MyNewClassName?c=MyExtension&v=1.1
+ $parts = explode( '?', substr( $filename, 6 ), 2 );
+ $newClassName = $parts[0];
+
+ // If necessary, this will make a recursive call to this function to
+ // load the class using its actual, canonical name.
+ class_alias( $newClassName, $className );
+
+ if ( isset( $parts[1] ) && function_exists( 'wfDeprecated' ) ) {
+ $info = wfCgiToArray( $parts[1] );
+ $function = "name $className for class $newClassName";
+ $version = isset( $info['v'] ) ? $info['v'] : false;
+ $component = isset( $info['c'] ) ? $info['c'] : false;
+
+ // https://github.com/facebook/hhvm/issues/1018
+ $callerOffset = wfIsHHVM() ? 2 : 3;
+ wfDeprecated( $function, $version, $component, $callerOffset );
+ }
+
+ return;
+ }
+