Use
$this->getServiceContainer()
instead of
MediaWikiServices::getInstance()
in maintenance and tests.
Change-Id: I4066d7b2029296f1edb164acc5f8c812ccfba808
The field up_value is a varbinary and should be provided as string,
not all rdbms implicit converts int/strings
Change-Id: Ideb28ad9cc475dad84d0f7dc45a0f3c286f4487c
MediaWiki's PHPCS plugin requires documentation comments on all
methods, unless those methods are fully typed (all parameters and
return value).
It turns out that almost all of our methods are fully typed already.
Procedure:
1. Find: \*(\s*\*\s*(@param \??[\w\\]+(\|null)? &?\$\w+|@return \??[\w\\]+(\|null)?)\n)+\s*\*/
Replace with: */
This deletes type annotations, except those not representable
as PHP type hints such as union types `a|b` or typed arrays `a[]`,
or those with documentation beyond type hints, or those on
functions with any other annotations.
2. Find: /\*\*/\n\s*
Replace with nothing
This deletes the remaining comments on methods that had no prose
documentation.
3. Undo all changes that PHPCS complains about (those comments
were not redundant)
4. Review the diff carefully, these regexps are imprecise :)
Change-Id: Ic82e8b23f2996f44951208dbd9cfb4c8e0738dac
* Add @var comments to untyped getService() calls so IDEs and tools
are able to understand where the callers are.
* Use the more specific IReadableDatabase where possible.
* Fix missing import.
Change-Id: I9c1153cb9fe872227753628a947f40bd5ee447fa
Opt out users who are active (according to Special:ActiveUsers)
and have at least 100 edits, unless they have already opted in
by enabling the beta feature.
To run the script, use the new run.php wrapper:
php maintenance/run.php MediaWiki.Extension.DiscussionTools.Maintenance.NewTopicOptOutActiveUsers
Bug: T317375
Change-Id: I953c4c9d00a60b00a621049b119ba96c9682004d
Change code to match the documented consensus formed on T321683:
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Exception_handling
* Do not directly throw Exception, Error or MWException
* Document checked exceptions with @throws
* Do not document unchecked exceptions
For this extension, I think it makes sense to consider DOMException an
unchecked exception too (in addition to the usual LogicException and
RuntimeException).
Depends-On: Id07e301c3f20afa135e5469ee234a27354485652
Depends-On: I869af06896b9757af18488b916211c5a41a8c563
Depends-On: I42d9b7465d1406a22ef1b3f6d8de426c60c90e2c
Change-Id: Ic9d9efd031a87fa5a93143f714f0adb20f0dd956
The parser cache for parsoid output isn't yet ready for full load.
Don't flood it when running batch operations.
Change-Id: I77f3de30b0500f0e5c593f4d31dceef7720f848e
* Fix estimate when using --current
* Add waitForReplication() after batches
* Add an option to restart from a specific point
* Remove TableCleanup, which doesn't work well for these use cases
* Use index on page_id when processing current revisions only
Bug: T315510
Change-Id: Idf9759743e67b3e116d6e20234b603bd76d4a41f
Consistent with core, most WMF extensions, and boilerplate as
documented in extensions/README and elsewhere; as per T316722.
Change-Id: I02cfcb2bd3debf877d1cbf8654dff4a98dd354ad
We run MediaWiki from directories like "php-1.39.0-wmf.26",
whose names include dots, making these scripts impossible to run.
Bug: T316548
Change-Id: Ic318939cea6eafb1a0cd3105517e45c9fca52f4b
This avoids that the script is executed without the extension is
installed.
This avoids than an error when class is missing
Change-Id: I064d2be5dbaa3b43c8134e19694511398decba88
Add .phpcs.xml to run codesniffer against the extension.
The entry in composer.json is already there
Change-Id: If9de7e9b1b9439dc4d5fa2ba521883d13deaa739
Add the Moment Timezone library. Add a script for managing libraries,
like in MediaWiki core.
Depends-On: I9a59a6ad01850b30327e4215f2be61b8d1c41277
Change-Id: I64bc79e7d0ccdf42b006e5a225c8aa70ea5f4e15