Page MenuHomePhabricator

Deprecate and remove $wgAutoloadAttemptLowercase
Closed, ResolvedPublic

Description

It's still set as true by default: https://gerrit.wikimedia.org/g/mediawiki/core/+/fef19e24d7ffa1da54d999eb06e4e777f638dc71/includes/DefaultSettings.php#7409

It has been set false in development settings and WMF config for quite some time now. Maybe set it to false for next release, and remove after that?

Event Timeline

Inline documentation
/**
 * Switch controlling legacy case-insensitive classloading.
 * Do not disable if your wiki must support data created by PHP4, or by
 * MediaWiki 1.4 or earlier.
 */
$wgAutoloadAttemptLowercase = true;

given T8777: Remove PHP 4 compat cruft was closed in 2006, is this safe to disable?

Do not disable if your wiki must support data created by PHP4, or by MediaWiki 1.4 or earlier.

Is there anything likely stored in the database of ancient wikis where this might be a problem? Serialised PHP class names in the wrong case etc?

Sounds unlikely given T166759: If possible, turn off $wgAutoloadAttemptLowercase. Not sure if third party wikis would need any kind of migration.

A quick look at the task suggest at least some back compat aliases were added etc. So I think we're probably in a reasonable state. I guess if people report them, we can add others (if they exist/are needed)

The autoloader.log used in those tasks seems to not exist on mwlog1001 anymore. I don't know if there's any benefit from re-enabling it to check further

However, looking at the codebase, we've definitely got cases of case mismatching classes, and many more functions that have snuck in again...

Change 598738 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@master] Fix a plethora of class and function call case mismatches

https://gerrit.wikimedia.org/r/598738

Change 598739 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@master] Deprecate $wgAutoloadAttemptLowercase and set default to false

https://gerrit.wikimedia.org/r/598739

MW core fixed up in patch going through CI now. Extensions listed in T253628: Case mismatch of functions and classes. Skins still to dump on a task, though WMF production skins patches are up; one is blocked on a phan issue. PHPCS possible sniff in T253625: Check to find incorrectly cased php classes and function calls to prevent regressions (if possible)

Change 598738 merged by jenkins-bot:
[mediawiki/core@master] Fix a plethora of class and function call case mismatches

https://gerrit.wikimedia.org/r/598738

Change 598739 merged by jenkins-bot:
[mediawiki/core@master] Deprecate $wgAutoloadAttemptLowercase and set default to false

https://gerrit.wikimedia.org/r/598739

Change 863722 had a related patch set uploaded (by PleaseStand; author: PleaseStand):

[mediawiki/core@master] AutoLoader: Drop support for $wgAutoloadAttemptLowercase

https://gerrit.wikimedia.org/r/863722

Change 863722 merged by jenkins-bot:

[mediawiki/core@master] AutoLoader: Drop support for $wgAutoloadAttemptLowercase

https://gerrit.wikimedia.org/r/863722

Change 867307 had a related patch set uploaded (by PleaseStand; author: PleaseStand):

[operations/mediawiki-config@master] Remove obsolete setting $wgAutoloadAttemptLowercase

https://gerrit.wikimedia.org/r/867307

Change 867307 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove obsolete setting $wgAutoloadAttemptLowercase

https://gerrit.wikimedia.org/r/867307

Mentioned in SAL (#wikimedia-operations) [2022-12-15T14:06:08Z] <lucaswerkmeister-wmde@deploy1002> Started scap: Backport for [[gerrit:867307|Remove obsolete setting $wgAutoloadAttemptLowercase (T231412)]]

Mentioned in SAL (#wikimedia-operations) [2022-12-15T14:07:49Z] <lucaswerkmeister-wmde@deploy1002> lucaswerkmeister-wmde and ki: Backport for [[gerrit:867307|Remove obsolete setting $wgAutoloadAttemptLowercase (T231412)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-12-15T14:17:06Z] <lucaswerkmeister-wmde@deploy1002> Finished scap: Backport for [[gerrit:867307|Remove obsolete setting $wgAutoloadAttemptLowercase (T231412)]] (duration: 10m 57s)

PleaseStand claimed this task.
PleaseStand subscribed.

The changes in mediawiki/core and operations/mediawiki-config have been merged. There were no other Codesearch results (outside of release notes) for this setting's name.

The remaining reference in MainConfigSchema.php (and the generated file config-schema.php) only exists so that update.php will show a warning if the setting is found in LocalSettings.php. According to the commit message of rMWbb10b7d52887 , along with the linked discussion, this can be removed once we no longer support upgrading from 1.39.