Some, but not all extensions use their own PHP namespacing.
http://www.php-fig.org/psr/psr-4/ explains the idea behind this task.
Basic process. See https://gerrit.wikimedia.org/r/#/c/398320/ for an example of some of these steps
- Swap extension.json to use AutoloadNamespaces instead of AutoloadClasses
- Under "requires", set the "MediaWiki" version requirement to >= 1.31.0
- Move any PHP files deemed necessary
- PHPCodeSniffer helps us stick to same coding standards across MediaWiki and it's extensions. This is still work in progress, and some sniffs are still excluded in the file .phpcs.xml (and those exclusions should get removed, in the long run). Disable MediaWiki.Files.ClassMatchesFilename.NotMatch, MediaWiki.Files.ClassMatchesFilename.WrongCase and MediaWiki.Files.OneClassPerFile.MultipleFound in the file .phpcs.xml if these entries exist as exclusions.
- Fix any resultant test failures from any of the changes above.