aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/data
Commit message (Collapse)AuthorAgeFilesLines
* Provide the page title to localization on message parsingIsabelle Hurbain-Palatin2025-02-071-1/+2
| | | | | | | | | | | | | | | | Message parsing expects to have a page title available. The canonical way to do this seems to use the request context to create the message to be parsed, but this does not seem strictly necessary: Message::setContext only sets up the title and the user language callback, which would end up handled in the same way if we were passing RequestContext::getMain() here, which we have tried to avoid relying on so far in this part of the code. Hence, we rely on the page DBKey set by Parsoid to re-create a Title and pass it to the Message as PageReference, so that it is available when parsing the message. Bug: T380045 Change-Id: I587e64bed068a33fec27a91d303fe0a8cd585317
* Update Codex to 1.19.1Roan Kattouw2025-01-072-2/+2
| | | | | | | | | | | | | | | Also update Vue from 3.4.27 to 3.4.28, required by Codex 1.19.x. We'll update to Vue 3.5 soon (and also fix the issue that requires Codex and Vue to be updated in the same commit). Bug: T317792 Bug: T379299 Bug: T381798 Bug: T382175 Bug: T382391 Bug: T383073 Bug: T383080 Change-Id: I4d4ac2f18d9d314347f58646ecfff8257d7b7ade
* Fix Thumbnail404EntryPointTest::testStreamOldFile failures with gdAaron Schulz2024-11-251-0/+0
| | | | | | | | | | Scaling two very small and similar images down to a tiny size can result in the same png depending on whether gd or image magick is used. The tests should not depend on these config differences. Add some more wfDebug() statements to File::transform() methods. Change-Id: I441cbec1a949d0ed6df6e83c793063c5377f9654
* Merge "Do not pre-parse MessageValue arguments"jenkins-bot2024-11-151-1/+2
|\
| * Do not pre-parse MessageValue argumentsIsabelle Hurbain-Palatin2024-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | The previous version of this code was parsing MessageValue arguments and "assembling" the i18n message, which led to a double-parse of the message, which led to "dangerous" tags getting escaped. This patch fixes this behaviour. Bug: T380045 Change-Id: Ib08d2d44e4c84dadc50e1798afcbdc681cb459a3
* | SimpleParsoidOutputStash: add serialization test casesC. Scott Ananian2024-11-144-0/+4
|/ | | | | | | | | | | | The '1.44' test data is the current serialization output. The '1.44_native' test data is the output after I9e6b924d62ccc3312f5c70989477da1e2f21c86b which uses native PageBundle serialization. This is to establish forward-compatibility using the procedure described at https://www.mediawiki.org/wiki/Manual:Parser_cache/Serialization_compatibility Change-Id: I8d53ff3e9c600cce16a0fc07f3665a91e5d8036b
* Test SchemaMaintenanceDreamy Jazz2024-11-049-0/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * The SchemaMaintenance abstract class and the maintenance scripts which extend it (generateSchemaSql.php and generateSchemaChangeSql.php) are currently untested. * Testing these scripts will avoid bugs in the generation of SQL schema changes. What: * Create SchemaMaintenanceTest which is used to cover the SchemaMaintenance abstract class as well as the GenerateSchemaSql and GenerateSchemaChangeSql classes. ** For this, the /tests/phpunit/data/db/ folder is copied to /tests/phpunit/data/schema-maintenance/, with the generated SQL files then modified to match the expected output. The tests then compare the generated SQL against these files, so that any changes to the outputted SQL by the script can be detected through a straight comparison. * Two changes are made to SchemaMaintenance as part of testing the class: ** When the --validate option is passed and the validation passes, the script now outputs that the schema is valid instead of no output. This makes it easier to test this code and clearer to the user. ** A bug is fixed where SQL change generation for mysql does not place the SQL file in the expected location if the path provided in --sql includes the desired filename. Bug: T371167 Change-Id: Ib79fe98edd82730f686bb0e9cf7fd00ad30d9db9
* Merge "Add namespace to maintenance/includes classes"jenkins-bot2024-10-151-1/+1
|\
| * Add namespace to maintenance/includes classesJames D. Forrester2024-10-091-1/+1
| | | | | | | | | | | | | | Also a few other fixes of PHP class aliases spotted by phan. Bug: T353458 Change-Id: Ie79d65722c47c24f8f20f1293355cfd3c2e8c2ad
* | Test findDeprecated.phpDreamy Jazz2024-10-154-0/+60
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Why: * Maintenance scripts in core have low test coverage * This can cause issues such as the findDeprecated.php maintenance script not working, as described in T374832 * Testing the broken script after fixing it will avoid the script breaking again. What: * Fix the findDeprecated.php maintenance script to actually show when code is hard-deprecated. * Modify the script to allow mocking of the MediaWiki install path in PHPUnit tests * Create FindDeprecatedTest which tests that the script produces an expected output, without being specific about how the code finds the methods (to allow the method to be changed as discussed in T243403) ** To do this, create a folder in the data folder for the PHPUnit tests that has a mock file structure allowing the test to use a fixed list of soft and hard deprecated methods. Bug: T374832 Bug: T371167 Change-Id: Ic4933cef95ef1af7fa3939625ac1747106c71230
* Use import actor store where needed in RC categorisationDreamy Jazz2024-10-021-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - When temporary users are enabled, creating IP actors is disallowed apart from specific cases, such as importing revisions authored by anonymous users. - If such a revision includes a category link and wgRCWatchCategoryMembership is true, MediaWiki will fire a job to create a corresponding RC entry, which will attempt to attribute the RC to the anonymous IP that authored the imported revision and fail in doing so. What: - Track whether a category membership change job was triggered by an import, and allow RecentChange objects created by such jobs to create anonymous actors. Test Plan: 1. On a wiki with temporary accounts enabled and wgRCWatchCategoryMembership = true, import a revision via Special:Import that was authored by an anonymous user and contains a category link. 2. Verify that the import succeeds and that the corresponding RC entry shows up. Bug: T373318 Change-Id: I89abdca9c4ab8796a211df8b37c1bd7173a496e5
* Test checkComposerLockUpToDate.phpDreamy Jazz2024-08-296-0/+55
| | | | | | | | | | | | | | | | | | | Why: * Maintenance scripts in core are mostly untested and testing them will help to avoid regressions. * Doing this for frequently run scripts is important, as they may fail in ways not caught by running them in CI. What: * Create CheckComposerLockUpToDateTest that fully tests the associated maintenance script. ** Move test case composer JSON files used by the LockFileCheckerTest class into the 'phpunit/data' folder instead of placing them in the same directory to allow the new test class to use these files too. Bug: T371167 Change-Id: Id473ef440c6b7f8ecbb1c869f9cc0cf98705a0e9
* Codex: Allow a local development version to be usedRoan Kattouw2024-08-2225-0/+869
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developers can use this to test their local version of Codex with MediaWiki by pointing $wgCodexDevelopmentDir to their local clone of the Codex repo, e.g. $wgCodexDevelopmentDir = '/home/yourname/git/codex'; Setting $wgCodexDevelopmentDir affects where the following things come from: - Codex JS/CSS files for the full library - Codex JS/CSS files for code-split chunks, and the manifest.json file that points to them - Icons retrieved by CodexModule::getIcons() - CSS-only icons imported in Less - Design tokens imported in Less Other changes in this patch: - Add CodexModule::makeFilePath() to centralize the repeated path concatenation. This makes it easier to switch out the regular path for the dev mode path. - Replace all uses of $IP (which is deprecated) and MW_INSTALL_PATH in CodexModule with the BaseDirectory config setting. - Make CodexModule::getIcons() reset its static cache if the path to the icons file changes. Without this, it's impossible to make the unit tests pass. - Move the i18n messages code from the CodexModule constructor to getMessages(). It can't be in the constructor because makeFilePath() doesn't work there (it fails because the Config object hasn't been set up yet). - Add a 'mediawiki.skin.codex' import path so that we can stop hard-coding the path to the Codex mixins file. Without this, we can't make the Codex mixins come from the right place in development mode. - Consider $wgCodexDevelopmentDir in setting the cache key for compiled Less code, since changing this setting can change the output of Less compilation (by changing design tokens, icons or mixins). - Add unit tests for (the non-dev mode behavior of) CodexModule::getIcons() and the i18n message key handling. Bug: T314507 Change-Id: I11c6a81a1ba34fe10f4b1c98bf76f0db40c1ce98
* CodexModule: use list of i18n message keys from Codex packageEric Gardner2024-08-121-0/+5
| | | | | | | | | | | | | | | | Previously, ResourceLoader's CodexModule class was using a hard-coded list of message keys to add to the payload any time Codex components get used. But now we can get the list of messages directly from Codex. This change replaces the hardcoded list of strings with a call to file_get_contents(). The list of messages is defined in a file called "messageKeys.json" in the Codex package. In the next release of Codex, this file will be pulled in via foreign-resources.yml; for now it has been added manually to the Codex files in resources/lib. Bug: T371330 Change-Id: Ib7ca66d67153dfba72d8d49b0181d49b007eedce
* Use fake maintenance scripts in MaintenanceRunnerTest where necessaryDreamy Jazz2024-08-084-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * The MaintenanceRunnerTest class tests using real maintenance scripts and the code being tested can include the maintenance script files. * However, if running all tests together (such as when generating test coverage) the maintenance scripts may have already been loaded by integration tests that exist for those scripts. * Instead of fixing the specific instances, we should instead ensure that (where necessary) the MaintenanceRunnerTest tests using fake maintenance scripts only loaded by that test class. * Doing this prevents the files from being loaded anywhere else and ensures that the tests should not fail in this way again. What: * Update MaintenanceRunner::expandScriptFile to move the use of MS_INSTALL_PATH to a protected method that can then be mocked in MaintenanceRunnerTest. * Update MaintenanceRunnerTest to use fake maintenance scripts where necessary. This includes: ** No longer setting the current working directory as the MW_INSTALL_PATH, but instead set it as __DIR__. ** Creating several fake maintenance scripts to replace the uses of the real ones. ** Updating the data providers to reflect the changes. Bug: T371188 Change-Id: Ifacdcb8de5af53d2d5f4ed354af0d209384d7325
* [JsonCodec] Establish forward-compatibility with future codecC. Scott Ananian2024-06-1418-0/+18
| | | | | | | | | | Ensure forward compatibility with Ia1017dcef462f3ac1ff5112106f7df81f5cc384f by adding forward-compatibility test data generated by Ia1017dcef462f3ac1ff5112106f7df81f5cc384f and verifying that tests pass. Change-Id: I109640b510cef9b3b870a8c188f3b4f086d75d06
* Add parser cache test data for JsonDeserializable extension dataC. Scott Ananian2024-06-121-0/+1
| | | | | | | | | I realized that even though we have a lot of ParserCache serialization tests, and we have unit tests for JsonCodec, we don't have any tests which bring these together and include JsonDeserializable data inside ParserOutput objects. Change-Id: I9dfe1050c18010d1447e77e0670e9e601449b110
* Make MessageValue implement JsonDeserializableBartosz Dziewoński2024-06-1212-0/+12
| | | | | | | | | | | | | | | MessageValue and friends are pure value objects and newable, so it makes sense for them to be (de)serializable too. There are some places where we want to serialize messages, such as in ParserOutput. The structure of the resulting JSON is inspired by the way we represent Message objects as plain values elsewhere in MediaWiki, e.g. StatusValue::getStatusArray(). Co-Authored-By: C. Scott Ananian <cscott@cscott.net> Depends-On: Ia32f95a6bdf342262b4ef044140527f0676402b9 Depends-On: I7bafe80cd36c2558517f474871148286350a4e76 Change-Id: Id47d58b5e26707fa0e0dbdd37418c0d54c8dd503
* [ParserOutput] Remove unused TOCHTML from ParserCache serializationC. Scott Ananian2024-05-1734-0/+17
| | | | | | | | | | | | | This reverts commit b4cf4aa6bd3a4b874ab665cebd8261ab88bbee8d, which is no longer needed for ParserCache compatibility across trains. REL1_42 contains b4cf4aa6bd3a4b874ab665cebd8261ab88bbee8d, so MW 1.43 will not need this. This also adds new serialization test cases for 1.43 with this field removed; see https://www.mediawiki.org/wiki/Manual:Parser_cache/Serialization_compatibility Change-Id: I716e2efe7a491002e6e6b2300016165fffe3c0d6
* [ParserCache] Add serialization test cases for REL1_42C. Scott Ananian2024-05-1734-0/+17
| | | | | | | This matches the current status of the ParserOutput serialization for REL1_42, which uses an empty string for the unused TOCHTML property. Change-Id: Idcad27d0403dabf7478268e43aeb710da9af9fcd
* tests: Add CodexModule tests for full library modeRoan Kattouw2024-05-161-0/+1
| | | | | | Also convert the data provider to a generator. Change-Id: Id9cfe88d789f655ae7fc26ce48c7bba08fbee33e
* CodexModule: Remove CODEX_MODULE_DIR, instead use CODEX_LIBRARY_DIRRoan Kattouw2024-05-1516-0/+0
| | | | | | | | | | | | CODEX_MODULE_DIR is always the /modules subdirectory of CODEX_LIBRARY_DIR, so remove it and derive it that way instead. - Update tests accordingly - Rename test data files accordingly - Use CODEX_LIBRARY_DIR in one place where we had neglected to use a constant Change-Id: Ieb347c2d128f3addfb11f6aca79d63969434f342
* Extract XMP & Exif from WebP filesBrian Wolff2024-05-115-0/+0
| | | | | | | | | | | In addition to the webp spec, this also detects two non-standard conventions sometimes found in real files: Allowing a fourcc of "XMP\0" instead of the standard "XMP " and allowing the prefix "Exif\0\0" at the beginning of the EXIF chunk. Bug: T338341 Bug: T353981 Change-Id: I0ddc3322e1c2f4d4d7bb11732e05fd4ffb5eb692
* Localization output transformIsabelle Hurbain-Palatin2024-05-064-0/+13
| | | | | | | | This is an output transform to resolve the mw:I18n and mw:LocalizedAttrs to their localized forms. Bug: T358191 Change-Id: Id32bc05ff72eb2d9fba7f8c2f192c9f7812cbc70
* Merge "Drop 1.35 db updates"jenkins-bot2024-05-051-669/+0
|\
| * Drop 1.35 db updatesAlexander Vorwerk2024-05-031-669/+0
| | | | | | | | | | | | | | Per official policy, updates from versions older than two LTS releases are not supported. Change-Id: I8fb08e226c1a37580f95ee622a0703eee312d9ba
* | Reenable DoctrineSchemaChangeBuilderTest for sqliteAlexander Vorwerk2024-05-031-11/+3
|/ | | | | | | | | | was disabled in I60b66ff86e4c62 due to some weird issues with supporting doctrine/dbal 2 and 3. Regenerating the sqlite .sql patch with dbal 3 Follow-Up: I17d74705cdd5a2e1af0bda66bfa466067b8387a8 Change-Id: I2349e2cbb1760edef12e857c6269056322f57205
* tests: Import Codex token files by referenceRoan Kattouw2024-04-302-2/+2
| | | | | | | | | Importing them without using (reference) causes comments from the Codex file to be output (but only if they're /* comments */, not // comments), which will break these tests when we upgrade to Codex 1.5.0. Bug: T363712 Change-Id: Idb5b70e342d3f08edcabda2e8477ec2d259846cb
* Add 1.42 snapshot to sqlite db testsAlexander Vorwerk2024-04-231-0/+662
| | | | Change-Id: I7766727892e8ad785d244a2457a44436786cb137
* Update Codex from v1.3.5 to v1.3.6Roan Kattouw2024-04-021-1/+1
| | | | | | | | | | | | | | Bug: T350477 Bug: T358031 Bug: T358038 Bug: T358860 Bug: T360343 Bug: T360349 Bug: T360577 Bug: T361056 Bug: T361104 Bug: T361472 Change-Id: I12813bf0db89b72aa8f2a28ccccb3477e4361ac8
* Add TranslationAliasesDirs to specify special page aliases in JSONAbijeet2024-03-064-0/+30
| | | | | | | | | | | | | | | | | The TranslationAliasesDirs configuration allows defining translatable aliases in JSON files. The value should be a name or names of folders that contains files that have localized aliases. Each language should have a separate file. Currently, it supports defining special page aliases but in the future can be extended to support magic words and namespace aliases. The patch adds a script: ConvertExtensionsMessagesToTranslationAlias that can be used to convert existing ExtensionMessagesFiles to the new format. Bug: T89947 Change-Id: Ief16a48a8dc8742854f67301791aa2a0b0531116
* ResourceLoader: Fix regression of color mapping in Less.phpDerick Alangi2024-02-252-2/+2
| | | | | | | | | | | Less.php no longer requires mapping color names (https://github.com/wikimedia/less.php/blob/9bdb3fda0452a05769e51d9941f2cfc0871d5fc0/lib/Less/Colors.php#L9) to their respective hex values, see: I0e6fa0fa88b4ab8dc41c55524661 (T352866). If the color name is valid CSS, the color keyword (e.g. "green" is preseved by the less compiler). Change-Id: Ic91c9bb1d7b931f389cfaf3457d2fee845b9c3f0
* test: Add PHPUnit tests for BmpHandlerDoğu Abaris2024-02-083-0/+0
| | | | | | | | | Covered: - `testMustRender`: Confirmed handler's necessity to render the file. - `testGetThumbType`: Verified thumb type returned for BMP files. - `testGetSizeAndMetadata`: Tests with various BMP file sizes. Change-Id: Ib01914e1ab66ca10ff4e089a0fd591d0b544edf5
* Stop supporting composer 1.xReedy2024-01-241-1620/+0
| | | | | Bug: T316558 Change-Id: Ie512b43a601502deb50de24e1f3efc45b0223ced
* CodexModule: Throw exception for non-entry pointsAnne Tomasevich2024-01-174-157/+250
| | | | | | | | | | | | | If a generated chunk is listed in the codexComponents array, an exception will be thrown informing the developer that the item is not an export of Codex and cannot be required. Text fixtures and expected values were updated to match recent changes to the manifest that made composables explict entries. Bug: T353191 Change-Id: Ie3e35501993b1ad5d29ebecbcc8203e7f4ea8c81
* CodexModule: Add unit test for code splittingAnne Tomasevich2023-12-0113-0/+760
| | | | | | | | | | | | This requires the path to the Codex modules directory to be configurable, so we can use static manifest and component files in tests. This is achieved by changing the constant storing the Codex modules dir from private to protected so it can be overridden when creating a test module. Bug: T350054 Change-Id: Icd3c6c5d2a82f5a5fb1c38b52e54893034e7375c
* ResourceLoader: Preserve newlines in Vue templates in debug modeRoan Kattouw2023-11-211-11/+11
| | | | | | | | | | Ironically, our replacements to improve readability of Vue templates in debug mode actually ended up eating newlines in the string that is sent to the Vue template compiler. This caused bugs when inline comments were used in multi-line JS expressions in templates. Bug: T351771 Change-Id: I6b3ad5736a836ba75f57a49fd9b7ca2e237074c0
* Remove language coverter for KazakhAmir Sarabadani2023-11-201-46/+1
| | | | | | | | | | | | This has been constantly mentioned as buggy and broken and there is no official version of latin or Arabic (see the ticket for more details). This can be turned back as an extension if needed by third party users. Bug: T350684 Bug: T268143 Depends-On: I6180dca2c49b3119751766268acc56087aaf8414 Change-Id: Ifbf3c8954d885daf891f8d9efc11743d898302f0
* SVGReader: Detect CSS animated SVGsDerk-Jan Hartman2023-11-051-0/+17
| | | | | | | | | | | | This does a string check on animated and @keyframe in style elements for SVGs. If there is a match it will treat this SVG as animated. While in theory this could be a false positive, without fulling parsing the CSS, the chances of that seem minor and there are no real negative consequences either. Bug: T332790 Change-Id: I4b8b0781e8f9135d9ab856f3ec06f5a76c66c9a8
* tests: Add test file for sqlite updates since 1.41Umherirrender2023-10-291-0/+642
| | | | Change-Id: I641a044e50590233e023c2de28ccc18f8b498287
* ResourceLoader: Remove ResourcesTest::testCommentedLocalFileReferencesTimo Tijhof2023-10-201-7/+0
| | | | | | | | | * Unrelated to the ResourcesTest structure test as it isn't testing any of core's resources. * Moved to the libs/Minify repo in change Ia9018a966a5325d. Change-Id: If87035777633635fe4ad0f01790e7084f56f65a0
* Update Codex from v0.19.0 to v0.20.0Volker E2023-09-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for Codex's upcoming 1.0 release, this patch makes some additional changes in how the library is vendored into MW. * foreign-resources.yml: codex-search is removed as a stand-alone package (the upstream NPM package has also been deprecated). The search-specific build of Codex now lives in the main "codex" package. The foreign-resources.yml file has been updated to pull in the codex-search scripts and styles from this new location. * resources.php: The resource module definitions for codex-search and codex-search-styles have been updated to use the relocated CSS/JS files. * UMD bundles: Upstream, Codex now designates the CJS bundle as the primary entry point. A UMD bundle of the main Codex library is still produced but this is intended mainly for usage through CDNs or basic script-tag inclusion; in the future the codex.umd.js bundle may be removed from MediaWiki and users should not rely on it. The codex-search.umd.js bundle has been removed. * MJS bundles: Codex also produces .mjs (ESM) bundles upstream; for users outside of MediaWiki these are the recommended bundles to use. However, within MediaWiki only the CommonJS build should be used, as ResourceLoader does not support delivery of ESM scripts at present. The codex.mjs and codex-search.mjs bundles have been removed from MediaWiki with this patch. Bug: T335324 Bug: T340020 Bug: T340119 Bug: T344848 Bug: T345281 Bug: T345688 Bug: T346099 Bug: T346435 Bug: T346988 Change-Id: I84b26ddf5f9a0a98faf0df8c7acaa5f678032786
* Make ExifRotationTest dramatically fasterthiemowmde2023-09-122-0/+0
| | | | | | | | | | | | | Down from about 1000ms to 200ms. By using much smaller images. The absolute size of the images is not relevant for this test. Only the ratio. There was nothing special about the "landscape-plain.jpg" image. But "portrait-rotated.jpg" was: It's technically stored in landscape, but marked with an EXIF tag for rotation. I used exiftool to copy the EXIF data to the smaller version, so it behaves the same as before. Change-Id: Ie977dfbceff02e4dfde38a5ef82e8ff81b4d6980
* LocalisationCache: Add tests for preload behaviorLucas Werkmeister2023-08-082-1/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new block in testRecacheExtensionMessagesFiles() covers the underlying issue of T343343 and T343375; see change Icc3324aca7 for an explanation of the issue. In order for this test to not crash, we also need to adjust some of the other tests and data. MessagesEn.php defines $preloadedMessages, and LocalisationCache assumes (quite rightly so, really) that all of these messages will be found in the configured MessagesDirs. But in the test, we override MessagesDirs to point at the test’s JSON files, while still using the original MessagesEn.php with its $preloadedMessages. Now that we are triggering the preload mechanism (I think it wasn’t reached by the tests previously?), it triggers a PHP deprecation (since PHP 8) on the missing messages, which makes the test fail: > explode(): Passing null to parameter #2 ($string) of type string is deprecated I decided to fix this by adding fake entries for all $preloadedMessages to the test en.json file. This makes the other tests that compare the entire messages array fail, so instead only compare the three messages those tests care about ("present-*"). I don’t like this very much, but I dislike the other two approaches I can think of even more: check defined( 'MW_PHPUNIT_TEST' ) in the original MessagesEn.php file, or add a test-specific MessagesEn.php using the Language::getMessagesFileName hook. Bug: T342418 Bug: T343343 Bug: T343375 Change-Id: Iee11cb5c52cb9dd777b70a1daa06f41f2c3ca187
* LocalisationCache: Add CORE_ONLY_KEYS, ALL_EXCEPT_CORE_ONLY_KEYSLucas Werkmeister2023-07-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, it was technically possible to set some keys in extension messages files that didn’t make much sense (e.g. $rtl['en'] = true;). This prevents optimizing language creation, so going forward, we will no longer support that; ALL_KEYS is now split into CORE_ONLY_KEYS and ALL_EXCEPT_CORE_ONLY_KEYS (with a test verifying that no key is missing or overlapping or anything), and ALL_EXCEPT_CORE_ONLY_KEYS are silently skipped when loading extension messages files. To demonstrate that it’s okay to silently skip these keys, patch set 1 of this change on Gerrit instead raised a deprecation warning; CI indicated that this warning was never hit. Codesearch [1] also suggests that no known extension was actually using any of these keys. (The DonationInterface [2] and LandingCheck [3] codesearch results can be ignored: both of these define es-419 as a new language, using the Language::getMessagesFileName hook to register their MessagesEs_419.php as a “core” message file, not an extension message file.) [1]: https://codesearch.wmcloud.org/search/?q=^\%24(fallback|rtl|(digit|separator)TransformTable|fallback8bitEncoding|link(PrefixExtension|Trail|PrefixCharset)|date(Formats|Preferences|PreferenceMigrationMap)|defaultDateFormat|digitGroupingPattern).*%3D&files=\.php%24 [2]: https://gerrit.wikimedia.org/g/mediawiki/extensions/DonationInterface/+/f8b5fe95f77c8a9bc516bc52084d001477c70e2d/gateway_common/messages/MessagesEs_419.php#11 [3]: https://gerrit.wikimedia.org/g/mediawiki/extensions/LandingCheck/+/2537439aeebaf6ccc71b897fa683cdc4d06ae9d3/messages/MessagesEs_419.php#11 Bug: T342418 Change-Id: Ia3dffea390d4efdfa3a3cea549d079507718ef48
* LocalisationCache: Expand testsLucas Werkmeister2023-07-281-0/+16
| | | | | | | To ensure that Ia3dffea390 and I7ec2d87c0f don’t change this behavior. Bug: T342418 Change-Id: I4646b1c84116f51b6c2a826a41dc5c975d3d205c
* Add 1.40 snapshot to sqlite db testsAlexander Vorwerk2023-05-261-0/+648
| | | | Change-Id: I837a78d652d644ba8a86a835b29781f267066dda
* rdbms: Stop supporting MySQL in SQLite via regexAmir Sarabadani2023-05-052-532/+531
| | | | | | | | | Given that we now have abstract schema, any schema produced for SQLite will be produced specificly for SQLite, no need to do regex gymnastics that are hard to understand, maintain and obviously prone to break. Bug: T326181 Change-Id: I58741ff82460cfd9a350440d50b293ba67e3c939
* Merge "ResourceLoader: Descriptive error for Less imports from ↵jenkins-bot2023-04-111-0/+5
|\ | | | | | | codex-design-tokens"
| * ResourceLoader: Descriptive error for Less imports from codex-design-tokensRoan Kattouw2023-03-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | Importing Less files from @wikimedia/codex-design-tokens/ doesn't work, on purpose. Instead of letting these imports fail with a nondescript "file not found" error that doesn't help the developer understand why it didn't work, provide a descriptive error message that points them in the right direction. Bug: T328602 Change-Id: I992ccde79a59ad51c7ebfe3ac7548a6e531f4a59