I have an old extension that basically does this in LocalSettings.php:
require_once('extensions/Foo.php');
Foo::DoSomething();
When I convert it to use wfLoadExtension(), the code becomes:
wfLoadExtension('Foo');
Foo::DoSomething();
The second line fails with the error:
PHP Fatal error: Uncaught Error: Class 'Foo' not found in <path>/w/LocalSettings.php
It looks like wfLoadExtension('Foo') does not make the class Foo available in time. (The extension.js file point properly to the file containing the Foo class.)
Is there a workaround? The extension must run Foo::DoSomething() in global scope.