aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit
Commit message (Collapse)AuthorAgeFilesLines
* Merge "ResourceLoader: Add page title to user script syntax error"jenkins-bot2025-03-262-4/+4
|\
| * ResourceLoader: Add page title to user script syntax errorTimo Tijhof2025-03-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows-up Ie309e761f (53a3c8b417), in which we switched from calling JsMinPlus/JSParser (which took $fileName as argument, and throw an exception that already included "on line N in X.js") to calling Peast. That patch formatted the error as "on line N" but forgot to include "in X.js". Test plan: * Log in as admin and create "MediaWiki:Common.js" with "foo/;", which is invalid syntax. Then browse the main page and check the browser console. * Before: "Parse error: Unexpected: ; on line 1" * After: "Parse error: Unexpected: ; on line 1 in MediaWiki:Common.js" While at it, document why this cache key is not purely MD5-based, but also includes wiki and page title. Change-Id: I16c3b1dacd02ee26a254809e6a9ac60f72aba4da
* | Merge "htmlform: Drop HTMLForm::*Text and FormSpecialPage::*Text functions, ↵jenkins-bot2025-03-261-22/+2
|\ \ | | | | | | | | | deprecated in 1.38"
| * | htmlform: Drop HTMLForm::*Text and FormSpecialPage::*Text functions, ↵Umherirrender2025-03-261-22/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in 1.38 The following functions were removed: - FormSpecialPage::preText - FormSpecialPage::postText - HTMLForm::getPreText - HTMLForm::setPreText - HTMLForm::addPreText - HTMLForm::getPostText - HTMLForm::setPostText - HTMLForm::addPostText - HTMLForm::getHeaderText - HTMLForm::setHeaderText - HTMLForm::addHeaderText - HTMLForm::getFooterText - HTMLForm::setFooterText - HTMLForm::addFooterText Bug: T325474 Change-Id: Id8a05542fc56db52f3a5141a1b2125c1a602cf3c
* | | Merge "api: Remove deprecated ApiPageSet::get*Titles"jenkins-bot2025-03-261-25/+2
|\ \ \
| * | | api: Remove deprecated ApiPageSet::get*TitlesUmherirrender2025-03-261-25/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following functions were removed: - ApiPageSet::getTitles - ApiPageSet::getGoodTitles - ApiPageSet::getMissingTitles - ApiPageSet::getGoodAndMissingTitles - ApiPageSet::getRedirectTitles - ApiPageSet::getSpecialTitles Bug: T339384 Change-Id: Iba8499c2d1b4a10b918f563069534b90fed7f6f9
* / / page: Remove deprecated PageArchive::undeleteAsUserUmherirrender2025-03-261-55/+0
|/ / | | | | | | | | Bug: T339394 Change-Id: I4c7dd048913ee3d62982ec3bcbdb37548bd56280
* | Merge "Migrate MediaWiki.jobqueue to statslib"jenkins-bot2025-03-261-2/+2
|\ \
| * | Migrate MediaWiki.jobqueue to statslibAtieno2025-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch migrates the `MediaWiki.jobqueue` metric to the new Prometheus format. Bug: T359472 Change-Id: Ie1d54721a1849619fe9a33b74ad1c231868b1c26
* | | Merge "HookRunnerTestBase: Minor fixups"jenkins-bot2025-03-261-3/+5
|\ \ \
| * | | HookRunnerTestBase: Minor fixupsReedy2025-03-251-3/+5
| | | | | | | | | | | | | | | | Change-Id: I215eb8cccd50472b4fcb0f41ce1710d8ff9ca8fc
* | | | Merge "DomainEvents: Model page state before/after"jenkins-bot2025-03-253-12/+16
|\ \ \ \ | |/ / / |/| | |
| * | | DomainEvents: Model page state before/afterdaniel2025-03-253-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - PageStateEvent models a change in page state, so it should provide access to the state before and after What: - add getPageRecordBefore() and getPageRecordAfter() to PageStateEvent - Move getPage() from PageStateEvent down to PageRevisionUpdatedEvent. - Add getPageId() to PageStateEvent. - Add getDeletedPage to PageDeletedEvent Bug: T388588 Depends-On: I76b09f2275a74d02e5701de2082d6b256d6b3b78 Change-Id: I94c52c0314e5dbe9adf82aab732f2e54ca42f686
* | | | Merge "Namespace all remaining files in includes/skin"jenkins-bot2025-03-259-11/+11
|\ \ \ \
| * | | | Namespace all remaining files in includes/skinJames D. Forrester2025-03-259-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T353458 Change-Id: I3e829e35c93bcaae75e401b1801bddf93c0b416c
* | | | | Merge "Namespace all remaining files in includes/changetags"jenkins-bot2025-03-255-8/+9
|\| | | |
| * | | | Namespace all remaining files in includes/changetagsJames D. Forrester2025-03-255-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T353458 Change-Id: I3cf44dfe5425f2efb8409c83571c427447b053af
* | | | | Merge "Namespace all remaining files in includes/exception"jenkins-bot2025-03-2522-24/+31
|\| | | |
| * | | | Namespace all remaining files in includes/exceptionJames D. Forrester2025-03-2522-24/+31
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be changed later if people really care). Also, move the couple of exceptions in here that were already namespaced in the MW-top-level into the new space. Bug: T353458 Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
* | | | Merge ""(diff | hist)" are plain text and have no links for categorization ↵jenkins-bot2025-03-251-0/+34
|\ \ \ \ | |/ / / |/| | | | | | | entries in Recent Changes and Watchlist in non-grouping mode"
| * | | "(diff | hist)" are plain text and have no links for categorization entries ↵Kgraessle2025-03-201-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in Recent Changes and Watchlist in non-grouping mode Bug: T148533 Change-Id: I33d3f186c1b59c2fa1a0ed7c588ed14e63a49559
* | | | Merge "Deprecate OutputPage::showNewSectionLink(), ::forceHideNewSectionLink()"jenkins-bot2025-03-241-0/+3
|\ \ \ \
| * | | | Deprecate OutputPage::showNewSectionLink(), ::forceHideNewSectionLink()C. Scott Ananian2025-03-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OutputPage::getOutputFlag(...) method should be used instead. Bug: T301020 Change-Id: I3b5a76d30e88da1f29e50689cfab7d05ff83e43f
* | | | | Merge "Split OutputPage::getModulesInternal()"jenkins-bot2025-03-241-1/+1
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Split OutputPage::getModulesInternal()C. Scott Ananian2025-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for moving the module lists to OutputPage::$metadata, deprecate the additional parameters to OutputPage::getModules() and OutputPage::getModuleStyles(); refactoring the actual implementation to a new private method OutputPage::getModulesInternal(). Bug: T301020 Change-Id: Iea1a40fed68d3b61b8decf9ab838391b1477ff95
* | | | | Merge "Deprecate OutputPage::getNoGallery()"jenkins-bot2025-03-241-0/+1
|\ \ \ \ \
| * | | | | Deprecate OutputPage::getNoGallery()C. Scott Ananian2025-03-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also switch to using OutputPage::$metadata to store $mNoGallery, although the expected replacement is OutputPage::getOutputFlag(). This is a slight semantic change, as it is the OR of the NO_GALLERY flag for all ParserOutputs used to compose the Output, instead of simply being the value of the last ParserOutput used. This isn't expected to be significant in practice. Improved the documentation of ParserOutputFlags::NO_GALLERY while we're touching this code. Bug: T301020 Change-Id: Ibaa31df331974e98254ecfcc4393ec1fda2ebe64
* | | | | | Merge "PermissionStatus: Hard-deprecate toLegacyErrorArray()"jenkins-bot2025-03-242-0/+2
|\ \ \ \ \ \
| * | | | | | PermissionStatus: Hard-deprecate toLegacyErrorArray()Bartosz Dziewoński2025-03-242-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer used except by other hard-deprecated methods. Depends-On: I392088786faa4d52b7702dcf3b4e4549865b9650 Depends-On: I4760a342e7906000485142b63c739fb802bb40ed Depends-On: I377e30f91ae41730b14731133c763fa100fb616f Depends-On: Ic2302366e3d63413d110657ce999952b3fa7a1f6 Depends-On: I23ce3b4d26bbe58257b449993a54c45093007a3e Change-Id: Ibf274036a1522001144c41ebff99f544860f6408
* | | | | | | Merge "[OutputPage] replace ParserOutput::getText() options with ↵jenkins-bot2025-03-242-19/+24
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | ParserOptions, v2"
| * | | | | | [OutputPage] replace ParserOutput::getText() options with ParserOptions, v2C. Scott Ananian2025-03-212-19/+24
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppress TOC, section edit links, and set wrapper div class via ParserOptions, instead of by passing options to ParserOutput::getText(). In the process deprecate the public OutputPage::parserOptions(), which is no longer used internally, and add OutputPage::addTOCPlaceholder() to DRY out some oft-repeated code. Bug: T350626 Depends-On: I6c12db1e0c42fe5b50ef43a9b6ff6804f44081ea Depends-On: I0d557951b8e17de05e8ceadeb6c18d3811bbdaa8 Change-Id: Iec19f9f08a4d88ea534ffa7b24e6e01ffbba2723
* | | | | | Merge "Fully silence TRX profiler after autocreation"jenkins-bot2025-03-241-1/+4
|\ \ \ \ \ \
| * | | | | | Fully silence TRX profiler after autocreationGergő Tisza2025-03-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids profiler warnings for autocreation-related writes. Follows up I66e54b00a7a0485d7d5e4d8d61d74e6fb6619ccb which only did it for deferreds, but at least CheckUser uses an idle transaction callback for recording autocreation PII, which was stil emitting warnings. Bug: T388165 Change-Id: Idb18fdebb76c17c88fa36d42f7317c4c6151baee
* | | | | | | Hard deprecate wfUrlProtocolsWithoutProtRel and wfMatchesDomainList, ↵Ebrahim Byagowi2025-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated since 1.39 They have been deprecated since 1.39 in favor of UrlUtils::validAbsoluteProtocols and UrlUtils::matchesDomainList. Bug: T319340 Change-Id: Iff5fa7a3e517be15e4d60d96ab97f3f0575a1825
* | | | | | | Hard deprecate wfAssembleUrl, deprecated since 1.39Ebrahim Byagowi2025-03-241-0/+2
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been deprecated in favor UrlUtils::assemble() since 1.39. Depends-On: If1a6251b7ea31f7eed217500fdac74637508d683 Change-Id: I4cc95e03dc0bdc0912b41f7598058ab8219cdca5
* | | | | | Merge "REST: Make OpenAPI spec info strings translatable"jenkins-bot2025-03-244-4/+152
|\ \ \ \ \ \
| * | | | | | REST: Make OpenAPI spec info strings translatablebpirkle2025-03-214-4/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenAPI specs include an "info" section that includes strings such as "title" and "description" that are intended to be human-readable. Make all such strings translatable. Bug: T385855 Change-Id: I15285be6d196c0e7fd7e922f23058d7c09b6b31a
* | | | | | | Merge "REST: add translation disclaimer to REST Sandbox"jenkins-bot2025-03-241-0/+44
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | |
| * | | | | | REST: add translation disclaimer to REST Sandboxbpirkle2025-03-221-0/+44
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The REST Sandbox is currently implemented in Swagger UI, which does not support i18n for its own UI elements (it does happily display our internationalized OpenAPI spec). Add disclaimer text to the page if it is being viewed in a language other than English, so that users are aware this is a known issue (and is being worked on). Bug: T388399 Change-Id: I265aa1e7dce78715dd4977eeb460f1ca26dedbd9
* | | | | | Merge "rdbms: Fix disabled PostgreSQL test"jenkins-bot2025-03-241-94/+51
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | rdbms: Fix disabled PostgreSQL testTim Starling2025-03-241-94/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And clean up after version requirement was increased to PG 10. * In DatabasePostgres::indexInfo() iterate over all core schemas instead of just querying the current schema. I broke this after the test for it was disabled. * In ApiQueryAllPages, remove the PG 9 branches and simplify the comments. * In DatabasePostgresTest, fix the skip conditions for the introduction of DBConnRef. * Remove tests for "old insert ignore", and "old insert select", which no longer exist. * In testFieldAndIndexInfo(), create a prefixed table name since that's easier and safer than trying to switch domains just for this test. Bug: T259084 Change-Id: Ifab7c045c40d039e542e2df19037b342d4984472
* | | | | | rdbms: Use real type hints for objects instead of doc blocksBartosz Dziewoński2025-03-2311-40/+18
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly used find-and-replace: Find: /\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|) Replace with: \3 \1 \4 More could be done, but to keep this patch reasonably sized, I only changed the most obvious and unambiguously correct cases. I made some bonus corrections to the type hints too. Change-Id: Ic900d0a7c552ea3535276c1b47d87dcce66ec3d9
* | | | | Merge "exception: Remove 'exception-json' logging channel"jenkins-bot2025-03-212-38/+12
|\ \ \ \ \
| * | | | | exception: Remove 'exception-json' logging channelBartosz Dziewoński2025-03-212-38/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It provided structured exception data in a custom machine-readable format. Since MediaWiki 1.26, structured exception data conforming to the PSR-3 logging standard is also available on the 'exception' log channel, and nobody uses 'exception-json' anymore. But the fact that it exists and logs errors by default means that it has to be disabled, and clutters configs, for example: https://gerrit.wikimedia.org/g/operations/mediawiki-config/+/c0e5c7f71d70de5749f6770abcbbb7e57032bd29/wmf-config/InitialiseSettings.php#2225 https://gerrit.wikimedia.org/g/mediawiki/vagrant/+/c96e609b6ff6a73a412d3fd0a4291259eee026f6/puppet/modules/role/templates/psr3/settings.php.erb#57 Historical context: * Iacda90fb401f6a45ed1ac1a991e088: Add "exception-json" channel, 2013. * Ia7ba355d5925a6268ffa321ffc13cc: Add "error-json" channel, 2015. * I71499d895582bdea033a2516c902e2: Convert "exception" to PSR-3, 2015. * I782c96dac1181d12267fa610345e87: WMF disables "exception-json", 2017. * I7a6e6fa52a47a29ec04411a6c8b05e: Remove "error-json" channel, 2024. The custom data format has been reused for formatting exceptions in the REST API, so keep getStructuredExceptionData() and rescue the tests. Bug: T193472 Change-Id: If730618e5371a467cb76db239916b6bbe42512e3
* | | | | | Merge "EditResult: only stash reverts"jenkins-bot2025-03-212-30/+38
|\ \ \ \ \ \
| * | | | | | EditResult: only stash revertsdaniel2025-03-212-30/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - In I38cb5622238bc674 we started to write EditResults to the stash unconditionally. That's several orders of magnitude more than before and would flood the cache. We should only store the EditResult for reverts, and only if RC patrolling is enabled. - While this logic should really be in ChangeTrackingEventIngress, that currently doesn't work because some extensions need the cache to be updated before their hooks run, but the ingress is only triggered post-send. What: - Make DerivedPageDataUpdater skip writing to EditResultCache if the edit is not a revert or RC patrolling is not enabled. Bug: T388573 Bug: T386217 Change-Id: I4ac6efbdc1713c87153e66e0520c9f749a7a2a9d
* | | | | | | Merge "rdbms: Require SQLite 3.24+"jenkins-bot2025-03-211-3/+0
|\ \ \ \ \ \ \
| * | | | | | | rdbms: Require SQLite 3.24+Tim Starling2025-03-181-3/+0
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Require SQLite 3.24+, released June 2018. Minimum distro releases: Debian 10 (buster), Ubuntu 20.04, Fedora 29. Bug: T389028 Change-Id: I1f548ee162921fa8398740e4b0528703c84bcaa3
* | | | | | | Merge "enotif: Retrieve performer and title from RecentChange"jenkins-bot2025-03-211-4/+5
|\ \ \ \ \ \ \
| * | | | | | | enotif: Retrieve performer and title from RecentChangePiotr Miazga2025-03-211-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the second step to refactor EmailNotification notifyOnPageChange() method to use single RecentChange object instead multiple arguments. Previously we had to feed $editor, $title and some attributes. Instead we can just pass the entire RecentChange and let EmailNotification decide which properties to use. In the future, this will allow EmailNotification to listen to RecentChange domain events to trigger Notifications. Bug: T388665 Change-Id: I5882531e91cd84c4683522f06d829149fdfc534e