Generate $wgAutoloadLocalClasses with a maint script
authorErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 26 Sep 2014 23:13:23 +0000 (16:13 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 13 Nov 2014 23:41:31 +0000 (15:41 -0800)
commit396a76f2ff44d5597ce4187b19cc2a7639f7e1e2
tree2778ca0fcf476b6a618c23079677d1dc5c62865b
parentfc2e6df64ffabe9236b8b5eee43d3d89e235670a
Generate $wgAutoloadLocalClasses with a maint script

Currently all new classes in core need to be registered
with the autoloader.  This is acceptable but inconvenient.

This patch adds a script to read the output of php's tokenizer
to determine the names of all the classes within mediawiki core.
Patches with new or removed classes will just need to rerun
the maint script rather than manually adjusting the arrays.

A full conversion to psr-0 + composer would solve this as well,
but this is a very non-intrusive patch that can get us some
portion of the benefit(reduced manual maintenance) today rather
than months down the line once we figure out all the intricacies
of mediawiki + composer.

Change-Id: I8b1bdb84a9699de79f8b9951fa61e5437d083c55
autoload.php [new file with mode: 0644]
includes/AutoLoader.php
includes/utils/AutoloadGenerator.php [new file with mode: 0644]
maintenance/generateLocalAutoload.php [new file with mode: 0644]