Commit graph

6 commits

Author SHA1 Message Date
Daimona Eaytoy
2520f3d1c4 Replace more usages of deprecated MWException
Bug: T328220
Change-Id: Ie9b56bcf5e962e275d80570cad98d676da505894
2024-01-19 22:01:12 +00:00
Aryeh Gregor
7b791474a5 Use MainConfigNames instead of string literals, #4
Now largely automated:

VARS=$(grep -o "'[A-Za-z0-9_]*'" includes/MainConfigNames.php | \
  tr "\n" '|' | sed "s/|$/\n/;s/'//g")
sed -i -E "s/'($VARS)'/MainConfigNames::\1/g" \
  $(grep -ERIl "'($VARS)'" includes/)

Then git add -p with lots of error-prone manual checking. Then
semi-manually add all the necessary "use" lines:

vim $(grep -L 'use MediaWiki\\MainConfigNames;' \
  $(git diff --cached --name-only --diff-filter=M HEAD^))

I didn't bother fixing lines that were over 100 characters unless they
were over 120 and triggered phpcs.

Bug: T305805
Change-Id: I74e0ab511abecb276717ad4276a124760a268147
2022-04-26 19:03:37 +03:00
Alexander Vorwerk
9b09bf3112 Use updated ObjectFactory namespace
Depends-On: I99c5e5664d2401c36a9890f148eba7c25e6e8324
Depends-On: I48ab818b2965da14af15ef370aa83ad9455badd9
Depends-On: I018371e4b77911e56152ca7b2df734afc73f58a5
Change-Id: I04ebdb52102f6191d49a9cc70b1f98308299e72f
2022-03-09 23:04:51 +00:00
Tim Starling
d3b2b80067 LinksUpdate refactor
* In LinksUpdate, put each table in its own class, so that the
  special code for each table has a more elegant place to go.
* Use generators to abstract and flatten out the underlying ParserOutput
  data structures, without requiring the data to be copied. This allows
  the incremental logic which was previously duplicated for each table,
  i.e. computing insertions and deletions from the old and new state,
  to be factored out. The per-table batch classes act as container
  abstractions for the underlying data.

Bug: T263437
Depends-On: I472f4a023969bfde6298eb56112c16d2ae842199
Change-Id: Id40be19a8caa7b4669911927964cfd6755c25238
2022-01-04 15:35:57 +11:00
Tim Starling
e85d532aa2 RemoteIcuCollation
Add a collation that gets its data from a remote Shellbox instance. This
is meant as a migration helper to use during an ICU upgrade.

Add a batch method to Collation so that this can be somewhat efficient
when adding multiple categories.

Bug: T263437
Change-Id: I76610d251fb55df90c78acb9f59fd81421f876dd
2021-12-13 22:13:10 +00:00
Umherirrender
5b3d3ef802 collation: Create CollationFactory service
Use ObjectFactory specs for collation classes
Avoid the language construction in the factory class,
make it a detail of the implementation of each class

Follow-Up of Ifc96f851e6091ce834dbaf0e91695c648a42169c

Bug: T286079
Change-Id: Ib581f64aec8619986fb8dd49ceee0524d59a1b84
2021-09-04 02:46:06 +02:00