Page MenuHomePhabricator

Undeprecate \MW class alias
Closed, ResolvedPublic

Description

The MW class was added in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/990791 to provide a shorter syntax for retrieving certain objects when using eval.php/shell.php.

However, in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1166873, the class was namespaced (MediaWiki\Debug\MW) and the class alias for \MW is now deprecated.
I think that the class alias should not be deprecated and instead remain stable, as the entire point of the class is to reduce the amount of typing required in eval.php and shell.php, and removing the class alias and requiring users to type e.g. \MediaWiki\Debug\MW::srv() would do the exact opposite.

Details

Related Changes in Gerrit: