$wgShellLocale was a flawed solution to the problem of locale
dependence. MediaWiki has its own concept of locale (the Language
hierarchy) and any kind of dependence on the server's libc locale is
incorrect and harmful, leading to bugs. Developers have an expectation
that functions like strtolower() will work in a certain way, and
respecting the locale set in the environment at install time violates
this expectation.
The problems with using C as a locale, which led to $wgShellLocale, are:
* escapeshellarg() will strip non-ASCII characters. This can be worked
around by not using it. The security vulnerability it was trying to
fix can be prevented in another way.
* Shell commands like rsvg will fail to correctly interpret UTF-8
arguments. This is the reason for the putenv(). On Linux, this can
be fixed by using C.UTF-8, which we didn't know at the time. On
Windows, the problem is not relevant (there are unrelated issues
with UTF-8 arguments).
Bug: T291234
Change-Id: Ib5ac0e7bc720dcc094303a358ee1c7bbdcfc6447
This is done without a deprecation process since the function is
@internal and completely unused outside of core.
Bug: T291341
Change-Id: I4b074f83f9be67b5b5bc2d33b2a6a55bb109a2b3
With this patch deprecation warnings will be emitted
if $wgUser is accessed or written into. The only pattern
of usage still allowed is
$oldUser = $wgUser;
$wgUser = $newUser;
// Do something
$wgUser = $oldUser;
Once there is no deprecation warnings, we know that nothing
legitimately depends on $wgUser being set, so we can safely
remove the code that's still allowed as well.
Bug: T267861
Change-Id: Ia1c42b3a32acd0e2bb9b0e93f1dc3c82640dcb22
This change is for consistency to the file name and to other classes.
The old class name RandomPage is kept as alias for compatibility and is
now deprecated.
Also change the letter case in the class names and file names:
* SpecialRandompage -> SpecialRandomPage
* SpecialRandomredirect -> SpecialRandomRedirect
* SpecialRandomrootpage -> SpecialRandomRootPage
The change of the letter case of file names may cause problems on
Windows operating systems.
Change-Id: If4dd23126e0d032f42a86aff7d09414edcb1ade2
Use /* at the end of exclude-pattern when excluding the whole folder,
see Id95236edbd3d87f57719d235c7c9cee366180099 for explaination
Remove the file extension when excluding the whole folder,
because it process php files only by the extensions argument set to php
Change-Id: Icaad23ab4b1708a5ce17930f77067ac9224169b5
The quibble test infrastructure generates LocalSettings-installer.php
during continuous integration testing, and (depending on the exact
set of extensions installed) it could end up violating various sniffs
relating to excess white space. Easiest just to ignore it.
Change-Id: I34c5783a1bc8c5646fbabafaf442e20c91de41ed
Some irritating breaking changes, including dropping PHP 7.2 support
and renaming the classes we care about. For now, hack in via || and
some back-compatibility class aliases.
Bug: T270732
Change-Id: I685f099584d2f0e5fa17f1f4275eab5289c7bfee
As per comments on phabricator, the Suppressor was used when phan still
didn't have per-line suppression, which is no longer the case. The phan
script was also outdated and broken, so just remove everything.
Bug: T267859
Change-Id: Ic4a68dd30a4481656a5c44b2446cf851ea638c1c
Deprecated since 1.35, and no longer used in core, bundled, or
wmf-deployed projects.
Bug: T160813
Change-Id: Idd3166ef90d1795a0b22dc29d52de76048d0703e
This reverts commit ef7af6ea77.
Reason for revert: the rule is now working thanks to T243598.
Bug: T243529
Change-Id: I2e7e4e684adf74efdac3d23ceffc9958447998c5
Done with `composer fix` and suppressing the rest (i.e. sniffs for
global variables, which for core should be suppressed anyway).
Additionally, add `-p` to `phpcbf`, as otherwise it just seems stuck.
Change-Id: Ide8d6cdd083655891b6d654e78440fbda81ab2bc
IllegalSingleLineCommentEnd and IllegalSingleLineCommentStart don't
require any fixes, core is clean
Change-Id: Id4771b829d2f126b953bb312104a4d861703eb14
Member variables in HistoryBlobStub have been marked protected
SpecialPage::setListed() and listed() have been deprecated
CategoryPage::getCategoryViewerClass() and setCategoryViewerClass()
have been deprecated
Change-Id: Id1f530c2c8ec1171615f726dc7446431ee7ca8fe