Manual:Extension registration/Limitations

Extension registration does have known limitations that may make it unsuitable to convert your extension immediately.

Some of these are intentional, and others are just waiting for a developer to implement them :)

If you find something you can't do, please file a bug for it in the MediaWiki-Configuration Phabricator project.


 * Configuration settings must have a prefix of "wg" resolved, use a magic "_prefix" key : T97186

One advantage to this approach is that, if extensions ever get configured via a configuration database (there is a long-term plan for that to happen), strings will be easier to handle than integer constants.
 * PHP constants are not supported. Such constants can either be used for settings within LocalSettings.php, or simply within the extension's code.  If it's the latter, you should use class constants instead; these are superior for the same reason that class variables are better than global variables.  If it's the former, you unfortunately cannot use either global constants or class constants: global constants can't be set in extension.json, and class constants will get initialized too late to be used.  Instead, you should use raw strings, like 'medium' instead of ANIMATION_SPEED_MEDIUM or AnimationExtension::SPEED_MEDIUM.
 * You can't use paths to files in extension.json - T100956


 * Conditional namespaces are not supported: T141604

The workaround for much of this is to use custom registration.

If you find something you can't do, create a Phabricator task.