Manual:Extension registration/Migration/en

namespace IDs
Since MW 1.30, namespace IDs defined in  can be overwritten locally, by defining the respective constant in   before loading the extension. Consider for instance the following namespace declaration in a  file:

This would per default cause the constant NS_FOO to be defined to have the value 1212. However, this can be overwritten by defining the respective constant in LocalSettings.php:

This would cause the "Foo" namespace to be registered with the ID 6688 instead of 1212. When overriding namespace IDs, don't forget that all talk namespaces must have odd IDs, and the ID of the talk namespace must always be the subject namespace's ID plus one.


 * See also the extension registration wall of sadness (now superpowers).

The script  helps you migrating from PHP entry points to a JSON metadata file. If your extension supports older versions of MediaWiki, you should keep your PHP entry point  until you drop support for those older versions.

Sample command lines:

You may need to uninstall your extension from  if you receive errors that constants or functions cannot be redefined. You should replace your PHP entry point file (FooBar.php) with something like the following happens to not break wikis during the upgrade process.

Or skins

Retaining documentation
PHP entry points usually have some documentation of configuration settings that is useful and shouldn't be lost. Unfortunately JSON doesn't support comments. It is recommended that you transfer configuration documentation to a  file in the extension's repository. You should also document configuration on-wiki in your Extension:MyExtension page. It is possible to include some documentation directly in the  file as well. Extension registration ignores any key in  starting with ' ' in the top-level structure, so you can put comments in those parts of the JSON file. For example:

Version 1 of the  format also allowed   in   section, but this is no longer recommended or supported in version 2. field of the config variable should be used instead.

This should only be used for brief notes and comments.