aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/purgeExpiredWatchlistItems.php
Commit message (Collapse)AuthorAgeFilesLines
* add `use MediaWiki\Maintenance\Maintenance` to some maintenance classesNovem Linguae2024-12-051-0/+1
| | | | | | | | | this patch changes P–Z. still need to do subfolders in one file, I also deleted an errant line break that was disconnecting the class docblock from the class. Change-Id: I3b60c2a5817f12c47490e78e36cc18bfeeb98af9
* Exclude boilerplate maintenance code from code coverage reportsDreamy Jazz2024-08-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* maintenance: Begin using `Maintenance::getServiceContainer()`Derick Alangi2023-09-041-3/+2
| | | | | | | | | | | 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
* Use MainConfigNames instead of string literals, #5Aryeh Gregor2022-04-271-1/+2
| | | | | | | This should be the last of the usages in core, although I'm sure a few are hiding somehow. Change-Id: I7bf0b24bf23d3efb4c56a891830bbfe67945e899
* Purge expired watchlist itemsSam Wilson2020-03-261-0/+47
Add two methods to remove expired watchlist items: 1. A job that's triggered on about 10% of page edits; and 2. A new maintenance script. Bug: T244804 Change-Id: Ica8ab92837c38fa4d484726c94d5181c08387e28