On 26/12/11 09:20, Daniel Friesen wrote:
The support requests for users with "PHP Fatal
error: Cannot redeclare
wfProfileIn()" continue in #mediawiki.
My idea on how to fix the issue previously was to include in 1.18.1
(whenever we release it) an includes/ProfilerStub.php with something like:
<?php wfDeprecated( 'includes/ProfilerStub.php' );
So that it would override any dead includes/ProfilerStub.php from an old
version of MediaWiki and the bad require_once people still have would just
become a no-op and things would continue working.
Sounds good.
I've been starting to think that in 1.19 we should
drop StartProfiler.php
altogether.
StartProfiler.php simply exists to initiate the profiler. It's basically a
LocalSettings.php that runs before LocalSettings.php
Back in 1.17 we loaded things in the order:
StartProfiler, Defines, AutoLoader, DefaultSettings, LocalSettings
However the order we load things now is:
Init, AutoLoader, Profiler, Defines, StartProfiler, DefaultSettings,
LocalSettings
So there is absolutely no extra value to StartProfiler now since it loads
directly before our settings and can no longer profile things before the
settings.
As long as it's treated like an extension, with a minimum of
boilerplate PHP code in LocalSettings.php, I think that should be OK.
-- Tim Starling