* Constructor without injected services.
* Class name alias RandomPage.
The class name SpecialRandomPage can removed in 1.43.
Accoding to
https://codesearch.wmcloud.org/search/?q=RandomPage
there is no usage with the old class names or without injected
services.
Bug: T265308
Depends-On: I889266c7b1435c6849a63fa5d99f272c9650e96a
Change-Id: I9ae2655084128ff5e9531f4d4431cab966c72341
This class belongs with the rest of the Parsoid output stash code.
This class has been marked @unstable since 1.39 and thus the move
does not need release notes.
Change-Id: I16061c0c28b1549fbe90ea082cc717fee4a09a6e
The idea is that all entry points should share the code in the
MediaWikiEntryPoint base class. This change by itself doesn't achieve much, it should be followed up by a change moving request handling logic from ResourceLoader into ResourceEntryPoint.
Bug: T354216
Change-Id: Iadea44b7867f48a2be6ccbf00c0e56911a5af74e
The goal is to unify the high level control flow in entry points by
making them use a shared base class. Eventually, this will allow
us to test all aspects of request handling, including response
headers and output buffer handling. That will however require
us to move quite a bit of logic from ApiMain into ApiEntryPoint.
Bug: T354216
Change-Id: I4ea1cbb8b2786c24deade7d5029d95fe0c2abc57
1) Introduce EntryPointEnvironment which wraps functions that interact
with the PHP runtime, so they can be mocked for testing.
2) Allow server info fields to be overwritten in FauxRequest.
3) Make MediaWikiEntryPoint use WebResponse to set headers
Bug: T354216
Change-Id: Ic21950c956de5d2b5a7dd66a1e2de58f807cfd9f
The idea is that all formatters that need the user language or
other request specific context should be instantiated by
FormatterFactory.
Change-Id: I8334cc89dcf0f293298b82e004116be50a90f0d1
Why:
* The user_is_temp column exists in the user table to allow finding
temporary users when reading from the DB directly.
* This column was added in f283c0e990,
but this was not written to until
6e68107b3a which was several months
later and after a release version was branched.
* As such, we need a maintenance script to populate the user_is_temp
column for wikis that have enabled temporary account creation.
What:
* Add a maintenance script named populateUserIsTemp.php which
populates the user_is_temp column by looking for rows in the
user table that have user_is_temp as 0 and have user_name match
at least one temporary account match pattern. These rows are then
updated to have user_is_temp as 1.
* This script will be added to update.php in a future commit, so that
betawikis can have this run manually.
* Create unit tests and an integration test for this maintenance
script.
Bug: T355181
Change-Id: I6223496d7aee65e3ab207fe86e386b01bef8b388
Move it to the StringUtils class, and make it throw a dedicated
exception. Update code in media/ to use the new method. Those seemed to
be the only usages across all known MW code [1], so hard-deprecate the
method as well.
[1] - https://codesearch.wmcloud.org/search/?q=wfUnpack&files=&excludeFiles=&repos=
Change-Id: I82ce96b6373443cf57a48b98595ca05290f37349
Introduce LockFileChecker that used to check whether
composer-installed dependencies (no-dev) are up-to-date.
Bug: T283389
Change-Id: I0d56f235604d5c856bae5d170230f8c7ca0729c6
The old ipblocks table is left touched.
The data is normalized to match the new schema, including resolving
any data integrity issues with ipb_parent_block_id (T282890).
Data is not validated as it is copied. Existing logic could be used from
DatabaseBlockStore, but it performs other non-idempotent actions, and
would probably slow down the script.
The default batch size is 500 instead of the typical 1000 because two
INSERTs are performed for each ipblock.
Bug: T350361
Bug: T282890
Change-Id: I526bb9b8febc5c1cb6a56b9a1044dedcf99c2224
Why:
Sometimes, it is necessary to have different behavior
for newly registered and existing users. For example,
this happens in the Echo or GrowthExperiments extensions.
As of now, this behavior is implemented by inserting
user_properties rows in onLocalUserCreated.
Over time, this results in a singificant amount of rows
inserted, which contributes to the user_properties table bloat,
which is already overly large (cf. T54777). This patch makes it
possible to remove such rows by supporting conditional defaults
for user properties.
What:
Add support for conditional defaults of user properties. This can be
configured via `ConditionalUserOptions` config option.
Bug: T321527
Change-Id: I1549c3137e66801c85e03e46427e27da333d68e2
This extracts the MediaWikiEntryPoint base class and ActionEntryPoint
class from the MediaWiki class. MediaWiki itself be deprecated.
The intent is to create other subclasses of MediaWikiEntryPoint for the
use by other entry points such as thumb.php or api.php. This will allow
us to share code between entry points, and make these entry points
testable by moving their implementation into a class.
Bug: T354216
Change-Id: Ib70e4e67e4cb1b65ac218c095864fb6eb43d0929
It was using Mediawiki not MediaWiki
Follows-Up: Ibc46c34072eadb3e84f69df49a3a424f3864c952
Follows-Up: I53551ec6d6471569709c71c1155729e550f64de8
Change-Id: Ia37a6330d64c3179d7abc12ec3f6fc7daca2e371
Why:
- PHPUnit errors when running locally (T353873)
What:
- Add Maintenance namespace to script
- Make uppercase to match convention for other classes
Bug: T353458
Bug: T353873
Change-Id: I3d2200ee9b53f45d39e7f7b143f1128b2d855849
Two of the classes in this directory have already namespaced to
MediaWiki\PoolCounter.
Bug: T353458
Change-Id: Ie41f8d935f7623bb40040a5eb78f99c6d7b7b75e
When using HtmlHelper for style deduplication, slight differences in
the serialization format used by the legacy parser caused test failures.
Add a "compatibility" mode which tries to better match legacy parser
behavior for void elements, character escapes, and other details.
Parsoid HTML has always been serialized using an HTML5 serializer,
so this compatibility mode will be disabled when processing Parsoid
HTML.
Change-Id: I0441aa3e44f6562e05e95a18cc282c53fe446788