This does not include use of MediaWiki\Maintenance\Maintenance,
assuming the maintenance scripts going into the same namespace
Change-Id: I488f95b537ce86eb5e463be7bce3653610dd13d9
The variables on the converter are not usable outside of the class,
so making the public ones also private.
Change-Id: I6087dcdac761916359009548beb5210671a32ee5
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I7dec01892a987a87b1b79374a1c28f97d055e8fa
Why:
* Maintenance scripts in core have bolierplate code that is
added before and after the class to allow directly running
the maintenance script.
* Running the maintenance script directly has been deprecated
since 1.40, so this boilerplate code is only to support a now
deprecated method of running maintenance scripts.
* This code cannot also be marked as covered, due to PHPUnit
not recognising code coverage for files.
* Therefore, it is best to ignore this boilerplate code in code
coverage reports as it cannot be marked as covered and also
is for deprecated code.
What:
* Wrap the boilerplate code (requiring Maintenance.php and then
later defining the maintenance script class and running if the
maintenance script was called directly) with @codeCoverageIgnore
comments.
* Some files use a different boilerplate code, however, these
should also be marked as ignored for coverage for the same
reason that coverage is not properly reported for files.
Bug: T371167
Change-Id: I32f5c6362dfb354149a48ce9c28da9a7fc494f7c
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: I02396a408fb00ef32ddf6d9b164f37dffc3e0dab
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: I50920b1be658741bfb3643e3992b3ebd6727e0ec
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: I4da56d4083406639a41a15de6ed9263411217ac3
This patch introduces a namespace declaration for the
MediaWiki\Json to FormatJson and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: I5e1311e4eb7a878a7db319b725ae262f40671c32
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: I71591d77028d818dc20e04b9be4508e74c127f83
Changes to the use statements done automatically via script
Addition of missing use statements and changes to docs done manually
Change-Id: I443aada1c18c8628b02671aa9fd6f441961e5c2e
Maintenance class provides a method for getting a fresh reference
of the MW services container instance. Let's make use of these in
maintenance scripts now that we have it.
NOTE: There are still some static methods like in refreshLinks.php
that makes use of services that we can't use this method for now.
Change-Id: Idba744057577896fc97c9ecf4724db27542bf01c
When the value of the associated array is not used, there is no need to
use array_keys and create internal a copy of the array, just omit the
value with $_ to tell static analyzer that the var is unused.
Change-Id: I5c6d667e98c0167c0573c683f0d617bc1d4ca619
Update the python script so that the generated PHP file uses proper
indentation. Correct indentation will be enforced with PHPCS (T319352),
and this file alone is responsible for roughly 20000 violations. Even if
it's automatically generated, to me it seems better to have it comply
with our conventions, rather than excluding it.
Bug: T319352
Change-Id: Iafaca207d21e56257d2e0adec53934855a5a7c2a
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: If2a859cc25bee0c4c3b5024c2ba3a56e23b29509
* Unnecessary regex modifier. I agree with this inspection which flags
/s modifiers on regexes that don't use a dot.
* Property declared dynamically.
* Unused local variable. But it's acceptable for an unused local
variable to take the return value of a method under test, when it is
being tested for its side-effects. And it's acceptable for an unused
local variable to document unused list expansion elements, or the
nature of array keys in a foreach.
Change-Id: I067b5b45dd1138c00e7269b66d3d1385f202fe7f
Since 1.36, intl has been a required PHP extension, and PHP 7.4 dropped
support for ICU < 50.1 (Unicode 6.2), so:
* In SpecialVersion, don't check whether INTL_ICU_VERSION is defined.
* Remove check in the installer for outdated Unicode normalization. It
was added over twelve years ago in r70126 (a21fb8651f) with a
comment that it should be kept up to date, but no one ever did.
* Remove IcuCollation::getUnicodeVersionForICU(), which contained a long
list of ICU versions and corresponding Unicode versions that had to be
kept up to date manually. Instead use IntlChar::getUnicodeVersion(),
which was added in PHP 7.0. There are no known callers outside core.
* Remove LinkFilter::supportsIDN(), as ICU has had support for UTS#46
since version 4.6. There are no known callers outside core. Also
remove $flags and $variant from the idn_to_utf8() call, which match
PHP 7.4's defaults. (INTL_IDNA_VARIANT_2003 was the default in 7.3.)
* Display the ICU and Unicode versions in the installer, just below the
PHP version. The ICU version is shown on Special:Version near the PHP
version, and it probably makes sense to show it there as well.
Change-Id: Ibdfac1a6f46fd56b84de1140292e0ec863f043ee
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: If2f2e3117eb6d5716bcf7bf2fd2409e4fa77382b
generateUpperCharTable.php: add --title option, which generates the
title case table.
Allow generateUcfirstOverrides.php to take multiple "override" tables
This is to allow MW with PHP 7.4 to act like PHP 7.2 regardless of
whether the MW core title case patch If02247fd15ad2a392a488d is merged.
It's just a union of the result arrays.
Bug: T292552
Change-Id: Id0a727ba3ac714b1198dd7556a3d5d0dd2ca973b
Most of the changes are generated with the help of my modified version
of Makefile.py and the BCompare software.
Also:
* Rules about 鰛、鳁、鰮 in symme_supp.manual are removed since they are
not one-to-one rules as the file should handle.
* Rules of 乾卦、髮踴沖冠、矇松雨 in tradphrases.manual are removed to fix
the output table.
To reviewer: You may want to check other terms which are removed from
tradphrases_exclude.manual but still exist in tradphrases.manual.
Since some useless rules are added in recent years, I will upload my
revised version of Makefile.py in a follow-up which can provide warnings
about probably wrong inputs.
Change-Id: I139e26f7b6fc5730ae65474567f5a53c77e3d292
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: Ie26ebbf60c3cf53814d28e861a5f5bb61e04d7ab
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: I504cc826959538703c2b15f7ccc62c544eedafd2
In e07a279a39 ZhConversion.php was moved
from
languages/data/ZhConversion.php
to
includes/languages/data/ZhConversion.php
Change-Id: If48e19c89882a72ba130b98cf9f1ef62e2626462
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: I14fc68ae8f6792e24127aaa93f6fe7aa1f786a26
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: Ibb306188daa8c1fb97ae45d07f44022c35f46115
* Turn normalize data into an autoloadable class and use the class name
as key instead of a partial file name with a base directory.
* This protected function is not aimed at re-use in extensions,
has no other usage known to Codesearch. Mark it internal,
and remove the compat introduced by 31283f34bf.
* Update the now ten-year-old documentation comments that described
this as "Temporary". The functionality and comment were introduced
in 2010 by Tim with r60599 (ad19c032b0).
Ref <https://bash.toolforge.org/search?p=0&q=temporary>.
* Replace the broken wikitech-l archive link with a working one,
and describe the thread for easier future reference.
Bug: T225756
Change-Id: I004da1f25c19e1095d0917349f2ba8461f9f0715
One exception message contained a trailing dot/space, which I removed
as well, following I935835316c0.
A very small number of exceptions and output() calls contained trailing
space, which I removed for consistency.
Change-Id: I16f48c1a051c452bbef699eb9b7476d83f8821d8
array_fill_keys() was introduced in PHP 5.2.0 and works like
array_flip() except that it does only one thing (copying keys) instead
of two things (copying keys and values). That makes it faster and more
obvious.
When array_flip() calls were paired, I left them as is, because that
pattern is too cute. I couldn't kill something so cute.
Sometimes it was hard to figure out whether the values in array_flip()
result were used. That's the point of this change. If you use
array_fill_keys(), the intention is obvious.
Change-Id: If8d340a8bc816a15afec37e64f00106ae45e10ed
This deprecates access to the global service container before
initialization is complete. For now, such premature access will
trigger a deprecation warning. In 1.37 we can prevent it entirely.
Bug: T153256
Change-Id: Ibd3ab32d92c9c3d3783082ab574739467c1c2ff9
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: Ife8aa010d7b1d77c2fe05df4bea856c4f36c464b