aboutsummaryrefslogtreecommitdiffstats
path: root/includes/DevelopmentSettings.php
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Split log files by parallel groupingKosta Harlan2024-10-101-6/+27
| | | | | | | | | | | | | | | | | | | | Why: - When tests are run in parallel, they are organized by groups--it is useful to be able to see logs organized by each test group. What: - Set an environment variable in ComposerLaunchParallel, `MW_PHPUNIT_SPLIT_GROUP_ID` - If the environment variable is set, modify the file names used for logs in DevelopmentSettings to use `split-group-{group ID}` in the file name - CI script for checking if any errors have been logged was updated in I4283478a89d2a8d3a0502f836459b3fb21d99113 Bug: T375852 Change-Id: If5e08558a6efbb0139c320fda6f53ec73597ba60
* Add namespace to remaining parts of Wikimedia\FileBackendJames D. Forrester2024-10-031-0/+2
| | | | | Bug: T353458 Change-Id: I49c843c9d8f6459c0fbf774afeea7a82fa564b59
* REST: Introduce discovery endpointdaniel2024-09-201-0/+1
| | | | | | | | The discovery endpoint provides basic information about accessing the wiki's APIs, as well as a directory of available modules. Bug: T365753 Change-Id: I161aa68566da91867b650e13c8aadc87cd0c428c
* REST: yank the new content.v1 moduledaniel2024-09-061-0/+1
| | | | | | | | We introduced the content.v1 module as an alternative way to access endpoints currently under v1/page and and v1/revision. This patch disables the module per default, and enables it in development mode. Change-Id: I044527601cbc19dfeb1282e9cd025265394c1cb8
* DevelopmentSettings: Enable temp user autocreationKosta Harlan2024-07-251-4/+2
| | | | | | | | | | | | | | | | | Why: - Enabling by default in DevelopmentSettings.php means that more developers will interact with the feature and we'll have more input into ways that the feature works with (or doesn't work with) various extension and configuration setups in local development environments What: - Enable temp user account autocreation by default in DevelopmentSettings.php Bug: T359043 Change-Id: Ie88043a7dd7f504092ddd9a6cae1320ab2dbd208
* DevelopmentSettings: Enable auto creation of temp users in CIKosta Harlan2024-07-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Temporary accounts will become the default anonymous editing paradigm on Wikimedia wikis (and maybe for MediaWiki via T355880), so we want this to be the default that we test against in CI What: - Enable AutoCreateTempUser in DevelopmentSettings.php when MW_QUIBBLE_CI is set. That means it will be enabled for CI, but not by default, in local development setups that include DevelopmentSettings.php Notes: - PHPUnit tests that need to run in an anonymous IP editing context should use TempUserTestTrait::disableAutoCreateTempUser() - Selenium and API-testing tests that specifically check anonymous IP editing context should use a custom LocalSettings.php override to disable temp accounts feature for the duration of the test Bug: T359043 Depends-On: I375cf7dfec1667396136402a85cbbb68efd43069 Depends-On: If48a33794132b46fb51d864bce103aa8285443c3 Depends-On: I604c521f00d5cc64b8102c93f9a013bcac557001 Depends-On: Id6ec4b9e438dd277a51f781377a93756fa4c3996 Depends-On: Ib0a176fe335cf45e5b2cdd351c95d5da162a1eb2 Change-Id: I8c4395ac1bdbc0c55aa45038cbbd589025b4aeef
* DevelopmentSettings: Disable rate limiting for temp accountsKosta Harlan2024-04-241-0/+5
| | | | | | | | | | | | | | | | Why: - For local development/testing, default rate limits are too restrictive What: - Disable rate limiting for temp account creation and temp account name acquisition Bug: T357777 Bug: T343101 Change-Id: Ie5a94d8b674010d33f49c8d141969f200be735ab
* Check warnings from INSERT during testsTim Starling2024-01-121-1/+2
| | | | | | | | | | | | | | INSERT IGNORE when inserting NULL into a non-nullable field will succeed with a warning on MySQL but fail on PostgreSQL. In any case, it's probably harmful and unintended. But to check the error code of MySQL warnings, you need to query the server with SHOW WARNINGS, so there is a performance cost. So, add a configuration variable which, when enabled, checks warnings after INSERT to see if there were any null type constraint errors. Set it to true in DevelopmentSettings.php and TestSetup.php. Change-Id: I5e47e2d3cc7e0f804036e11b512b1e3b76804432
* composer serve: create and set log directoryKosta Harlan2023-12-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | Why: - New users will appreciate having easy access to MediaWiki logs; in order to make that easier, we need to have a directory to write to and set an environment variable to use that directory What: - Set MW_LOG_DIR for the `serve` command - Add a `logs` directory at the root of MW, and gitignore it - Create the `logs` directory via DevelopmentSettings, if MW_LOG_DIR is defined but does not exist I considered the `cache` directory for the log location as it already exists, but it seemed preferable to not conflate cache and logs. Bug: T347347 Change-Id: Ic3ddb0203df07a0c93df9f431b25a2a5d9ecc407
* Replace $wgCommandLineMode checks with MW_ENTRY_POINT in developer codeBartosz Dziewoński2023-12-141-2/+2
| | | | | | | | This code should only be executed in development environments, never in production, so it should be safe to mess with it. Bug: T313841 Change-Id: I8cab7704b244db1432f4266b2e06e03452ffc98f
* Enable $wgUseXssLanguage in DevelopmentSettings.phpLucas Werkmeister2023-09-281-0/+2
| | | | | Bug: T340201 Change-Id: Id2e12970f273b602fdf17c282aec819a64b5b70e
* DevelopmentSettings: Limit display_errors to index.phpTimo Tijhof2023-09-061-6/+7
| | | | | | | | Reduce impact of deprecation warnings by not breaking non-HTML responses such as load.php and api.php with invalid syntax, which results in confusing silent failures in the frontend. Change-Id: I1e7f60290fd2498216180f263a1a418c28ad956e
* Merge "DevelopmentSettings: Do not override existing REST API config"jenkins-bot2023-03-051-1/+1
|\
| * DevelopmentSettings: Do not override existing REST API configGergő Tisza2023-03-051-1/+1
| | | | | | | | Change-Id: I49549eb68a7eeb0fde91522eec3fbbeb47aec5cd
* | Reorg: Migrate WikiMap to WikiMap/ out of includesAmir Sarabadani2023-02-271-0/+2
|/ | | | | | | And WikiReference Bug: T321882 Change-Id: I60cf4b9ef02b9d58118caa39172677ddfe03d787
* DevelopmentSettings: Fix typoReedy2022-12-231-1/+1
| | | | Change-Id: I501bd52b471fd41b8bb46da9b7b3d8c55f9f9d8b
* DevelopmentSettings: Enable Vue development modeKosta Harlan2022-11-171-0/+3
| | | | Change-Id: Id68a44273c6eb546873e4408e56aaa5569a2dade
* Enable pig-latin variant for testingdaniel2022-11-081-3/+8
| | | | | | | | | | Having pig-latin enabled per default in dev environments is convenient for manual testing. More importantly, it will allow us to write end-to-end tests for variant conversion. Depends-On: I9dc2f743ac487b0f7cfb667150c0f6950d5e7fce Depends-On: I85b66c85be3959d48a048733af17197bc4cf70af Change-Id: Ia80ad33cbf5e311fa8b84bd765a8df8d156f4c38
* Parsoid: Fix e2e tests for size limits.daniel2022-10-141-1/+7
| | | | | | | | | | | | | | | | | The tests for size limits did not catch an issue introduced by If09afc4b933e, which caused resource limits to trigger early, since they were now being compared to the size in bytes, rather than characters. The reason the tests didn't protect us is threefold: - They only check the error returned when the resource sizes is one over the limit. They don't check that the error is NOT returned when the size is one under the limit. - They did not test with a multi-byte character. - They were disabled, because the limits are quite high, and the e2e test can not change them. This patch is an attempt to fix all three issues. Depends-On: I40901a1204b3c698895a836bf3b605239878d1fe Change-Id: I2aead24cb7f47eb1267fdd2954a7c7e45dd4ed51
* debug: Fix $wgDebugRawPage to work with PSR-3 debug loggingTimo Tijhof2022-04-131-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | The benefit of this setting was largely lost due to wfDebug() having been replaced with calls to Logger->debug() for much of our code. This is motivated by making ResourcLoader debug=2 able to make its concurrent load.php requests more quickly during local dev. This effectively reverts T49960. I was wrong there, thinking that this variable has no reason for being. The vast majority of the time, these aren't of interest on subresource requests. It's trivial to enable when wanted, and any non-debug level messages still come through either way, including PHP runtime errors, exceptions, warnings, etc. This seems to make load.php about 50% faster for local development when using mediawiki-docker. I used `ab` to perform a load.php request 300 times. The mean was 320-360ms before this patch (with and without DebugRawPage=false), and around 120-140ms with patch (with DebugRawPage=false, default). Bug: T85805 Bug: T225730 Change-Id: I061419adebf43e83cd0103bdb9b7a3296a2a1122
* phpunit: Set $wgSQLMode from DevelopmentSettings instead of ↵Aaron Schulz2022-04-041-1/+1
| | | | | | | | | | | MediaWikiIntegrationTestCase (ii) This reverts commit 17bab86e7a07fa0ca70ee9790ebed0dde06bb589. Extension failures (ref T304625) have since been fixed. Bug: T225730 Change-Id: Ia452e076bdce45f1151f970c16837b80813ee08a
* Revert "phpunit: Set $wgSQLMode from DevelopmentSettings instead of ↵Alexander Vorwerk2022-03-241-1/+1
| | | | | | | | | MediaWikiIntegrationTestCase" This reverts commit 8a54b5ec38314ca0a6c0669742d168fb46c7da1b. Bug: T304625 Change-Id: Id54589603d56aa87b6a1e7d9570ebba5346dd70c
* Merge "phpunit: Set $wgSQLMode from DevelopmentSettings instead of ↵jenkins-bot2022-03-241-1/+1
|\ | | | | | | MediaWikiIntegrationTestCase"
| * phpunit: Set $wgSQLMode from DevelopmentSettings instead of ↵Aaron Schulz2022-03-241-1/+1
| | | | | | | | | | | | | | | | | | MediaWikiIntegrationTestCase This avoids a large number of SET query pairs during tests. Bug: T225730 Change-Id: Ic2729428297162763a772e6a16549ded8de06c01
* | phan: Disable scalar_implicit_cast settingUmherirrender2022-03-181-0/+1
|/ | | | | | | | | Make phan stricter about scalar types by setting scalar_implicit_cast to false (the default in mediawiki-phan-config) Bug: T242536 Bug: T301991 Change-Id: Ia2fe30b17804186571722e728578121c8b75d455
* DevelopmentSettings.php: Remove obsolete comment about --mwdebug paramAaron Schulz2022-03-151-3/+0
| | | | Change-Id: Idf2e03341abd0b5c9d8a2e1e2fc1baf91c92aa60
* DeferredUpdates: Introduce $wgForceDeferredUpdatesPreSenddaniel2022-02-151-1/+9
| | | | | | | | | | | | | | | | | | Enabling this setting will cause post-send deferred updates to be run before a response is sent to the client, so the client can observe all effects of their last request immediately. This resolves a problem with some end-to-end tests that were failing because the updates caused by one request had not landed in the database by the time the subsequent request was made. This patch re-enabled some e2e tests that were disabled because of this problem. If $wgForceDeferredUpdatesPreSend works as intended, the tests should again pass reliably. Bug: T230211 Bug: T301100 Change-Id: I0e30fdb6acba85cec4bb1499f7063ba6bfb0ffb2
* DevelopmentSettings: Move wgPasswordAttemptThrottle to correct sectionKosta Harlan2022-01-251-7/+7
| | | | | | | | | | This was intended as a setting override to faciliate testing, not as something that is experimental and may later become default. Follows-Up: Ief9e724c84755248a6fccfd04abdd4b03e331a8e Bug: T298735 Change-Id: I56e98926c7d857c0c221d3ffd9b3be0b4267b6ae
* DevelopmentSettings: Lift PasswordAttemptThrottle limitsKosta Harlan2022-01-121-0/+7
| | | | | | | | Seems to be needed to be able to run api-testing (and possibly also some browser tests) in parallel in CI / locally. Bug: T298735 Change-Id: Ief9e724c84755248a6fccfd04abdd4b03e331a8e
* Set $wgIncludejQueryMigrate to false as defaultAmir Sarabadani2021-08-291-3/+0
| | | | | Bug: T280944 Change-Id: I02a3e4f4a2b596ff2741436884b2ef9a4b2b9177
* Set $wgIncludejQueryMigrate to false in CI/devAmir Sarabadani2021-07-141-0/+3
| | | | | Bug: T280944 Change-Id: Iaf786cd0f1d870cbcf0b968b7adce616c82df3d8
* DevelopmentSettings: Don't disable rate limits but use very high onesPetr Pchelko2021-06-141-3/+8
| | | | | | | | | | Switching rate limits completely off make tests bypass an important code path. Instead, set all limits to almost infinity - the code will still be executed, but with no real chance that a test will exceed the limits. Bug: T284804 Change-Id: Ic1d011f251159990fd54cb706608793d1b0a5acf
* resourceloader: Remove support for $wgLegacyJavaScriptGlobalsAmir Sarabadani2021-04-191-4/+1
| | | | | Bug: T72470 Change-Id: I321a3bf5a85e2b4069ef003db65ac93b69692c83
* Ensure that the legacy wikitext editor is preferred by defaultAdam Wight2021-01-121-0/+2
| | | | | | | | Any change to the extension's defaults would disrupt tests, so we repeat the default here. Bug: T270240 Change-Id: I84791ecf8c35f60b7d2cc337d67572bb422f0ea5
* Enable VisualEditor newwikitext mode in CIAdam Wight2021-01-111-0/+3
| | | | | | | | | This allows browser tests to access the "new wikitext" mode, but should not affect any tests which don't explicitly enable the associated beta preference. Bug: T270240 Change-Id: I2ba889e1a5dd03549d8d7cb00678a30882ff03fe
* DevelopmentSettings: Make sure all currently used global have a `global` callReedy2020-09-211-5/+4
| | | | | Bug: T263475 Change-Id: I8a09a58d7ef2ed56eb26832e0899a4d2e15e5b72
* FileImporter browser tests require uploads enabledAdam Wight2020-09-181-0/+4
| | | | | | | Once this is merged, we can revert I8c20e4c4482f43191264490da7769dea7786ff0f Bug: T190829 Change-Id: I6eccad9b54c6b2c895e6aaaa1d783011aee64358
* mediawiki-docker: Add a jobrunner containerBrennen Bearnes2020-06-171-11/+0
| | | | | | | | | | | | | - Uses new stretch-php72-jobrunner from dev-images - Removes TimedMediaHandler-specific resource limits from general DevelopmentSettings.php, as we're putting these in the container PlatformSettings.php from docker entrypoints. Bug: T246935 Bug: T246942 Depends-On: I505366b287f75581a5dd8016abbedfe61f53cb13 Change-Id: I4b4061d9cd877af34606c914942cfe0be028fff8
* DevelopmentSettings: Disable resource limitsKosta Harlan2020-03-291-0/+11
| | | | | | | Useful for developing with TimedMediaHandler. Bug: T246942 Change-Id: I3c3ab8ae44f04cfb32fb276b580b3ee8366828fb
* Merge "DevelopmentSettings: Set cache dir to system temp + wiki ID"jenkins-bot2020-03-251-0/+6
|\
| * DevelopmentSettings: Set cache dir to system temp + wiki IDKosta Harlan2020-03-171-0/+6
| | | | | | | | | | | | | | | | Otherwise, require DevelopmentSettings.php in LocalSettings.php leads to an error because LCStoreStaticArray attemps to write to the root directory. Bug: T246547 Change-Id: I4b466cea2c830aed85e9df9f4ddd01b6997e1c45
* | Add config variable $wgRestAPIAdditionalRouteFilesBill Pirkle2020-03-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | New configuration variable $wgRestAPIAdditionalRouteFiles allows specifying additional Core REST API route files to include. The initial use is to include development routes from new file coreDevelopmentRoutes.json only on testing wikis, but not on production wikis. Bug: T247997 Change-Id: Iff8a9b7f4cafb29162e9b10f3d32e2a85f6f58df
* | Merge "DevelopmentSettings: Set EnableJavaScriptTest to true"jenkins-bot2020-03-121-0/+4
|\ \
| * | DevelopmentSettings: Set EnableJavaScriptTest to trueKosta Harlan2020-03-121-0/+4
| |/ | | | | | | | | Bug: T247285 Change-Id: Id973426b31eb1c98bff49ea135d0d64de09fcbbe
* / exception,deferred: Standardise on 'exception' for uncaughts and fatalsTimo Tijhof2020-03-061-2/+0
|/ | | | | Bug: T247113 Change-Id: Id72cae0672169e8d2622bbc67c3c0b59e7c8ad54
* DevelopmentSettings: Enable 'fatal' and 'DeferredUpdates' error channelsTimo Tijhof2020-02-151-1/+3
| | | | | | | | | | | | | | These used to be in the 'exception' channel but were separated out to better categorise them in Logstash, but this meant we regressed in terms of CI enforcement because they weren't enabled (they only went to the debug file), and thus Jenkins didn't fail the build if they were non-empty. To avoid having to keep this in sync with the Jenkins job config, standardise on a single file (mw-error.log), which the job already asserts as having to be empty/non-existent. Change-Id: I432682c082f77d9a6ec2ea07539c2a3e41ea1340
* Enable Book Referencing for development and testsAdam Wight2019-10-241-0/+4
| | | | | | | Sets a feature flag to allow browser tests to use an experimental feature. Bug: T236255 Change-Id: I1528c09bb2ae13c1a73f30432bdf3ec97d525860
* Set l18n cache to array in DevelopmentSettings.phpAmir Sarabadani2019-09-171-1/+4
| | | | | Bug: T218207 Change-Id: Ib52d766436f487570b26fde54abfb1ff780c3647
* DevelopmentSettings: Clarify grouping of settings and purposeTimo Tijhof2019-08-071-4/+18
| | | | Change-Id: Ia0fc063eb2679b466e19e6dabaf1f4bea7d6bb20
* Follow-up ffd802a386: Actually disable legacy JS globalsJames D. Forrester2019-07-211-1/+1
| | | | | Bug: T72470 Change-Id: I2703420afd260c1c9d0cdc17baceed12dc28f758