Timo Tijhof [Wed, 22 May 2019 18:29:32 +0000 (19:29 +0100)]
resourceloader: Skip modules with circular deps in tree optimiser
Either the server needs to omit these from the registry with
state=error output to the client (and server-side error logging),
or it needs to detect them, and transport them unchanged, so that
the existing client-side logic can handle it.
This patch does the latter.
Without the source code change in this patch, the added test case
fails due to "top" and "middle1" then being registered with
an empty array as dependencies.
Bug: T223402
Change-Id: I57502d7c4e434de4737759aed325dd4200ca89bf
Translation updater bot [Thu, 13 Jun 2019 20:08:04 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I2557496565cbdfee6bba829b3d2fdd36875aa5f7
jenkins-bot [Thu, 13 Jun 2019 19:41:01 +0000 (19:41 +0000)]
Merge "resourceloader: Deprecate ResourceLoaderContext::getConfig and ::getLogger"
jenkins-bot [Thu, 13 Jun 2019 19:33:07 +0000 (19:33 +0000)]
Merge "resourceloader: Change cache keys to use first segment for grouping by purpose"
jenkins-bot [Thu, 13 Jun 2019 18:40:38 +0000 (18:40 +0000)]
Merge "PHPDoc: Fix non-carnonical order of elements in phpdoc"
Daimona Eaytoy [Mon, 7 Jan 2019 10:18:39 +0000 (11:18 +0100)]
externalstore: Fix insert*() return docs and remove redundant checks
ExternalStorage::insertWithFallback is reported to return false on
failure, but it doesn't. It has a single exit point, and return value is
checked with strlen(), so actually it can only return the URL or throw.
Thus, update any related doc and remove a redundant check from code
calling insertToDefault.
Change-Id: Ic95c3aed19118b987aef105f8077d55558f39127
jenkins-bot [Thu, 13 Jun 2019 18:19:17 +0000 (18:19 +0000)]
Merge "objectcache: add object segmentation support to BagOStuff"
Timo Tijhof [Tue, 28 May 2019 18:24:31 +0000 (19:24 +0100)]
resourceloader: Change cache keys to use first segment for grouping by purpose
Remove use of a complete "namespace" for grouping and instead use dashes
within the first key segment for that.
This way, we can leverage the various features WANObjectCache provides
for statistics relating to a particular kind of thing being cached.
These statistics are currently combined for all of resourceloader,
which isn't useful. Mildly related to T223647.
Change-Id: I5df69e46ac436d04e765726a36fc3eb70697a7ed
jenkins-bot [Thu, 13 Jun 2019 17:57:41 +0000 (17:57 +0000)]
Merge "rdbms: reorganize Database fields and constants"
jenkins-bot [Thu, 13 Jun 2019 17:50:00 +0000 (17:50 +0000)]
Merge "rdbms: implement strictor ownership of LoadBalancer by LBFactory"
Aaron Schulz [Thu, 13 Jun 2019 11:27:30 +0000 (12:27 +0100)]
rdbms: reorganize Database fields and constants
Move the constants to the bottom and make more of them private.
Place the configuration fields at the top of the list.
Also, move some related fields closer to each other.
In addition:
* Rename the named lock tracking variable to start with the
prefix "session" for consistency.
* Remove unused $preparedArgs field.
* Rename $sessionVars and $rttEstimate fields.
* Use short field documentation syntax.
* Make transaction callback fields private.
Change-Id: I7d78be6744723f4d7bb32a75154564ee04eca0f6
Timo Tijhof [Thu, 11 Apr 2019 22:22:08 +0000 (23:22 +0100)]
resourceloader: Deprecate ResourceLoaderContext::getConfig and ::getLogger
The methods existed for two use cases.
1. Inside ResourceLoaderContext, usage was removed with I4e4ee758cd22.
2. In Module class methods that get $context, already have their own
Config and Logger instances injected from ResourceLoader::getModule(),
which should be used instead.
Deprecating these opens the paths for making ResourceLoaderContext
a purer value object with no ResourceLoader, Config, or Logger objects
needing to be passed (in the future).
Bug: T32956
Change-Id: I74a9535918ea43b2c00073c5d4469f864d1eeb41
Fomafix [Mon, 10 Jun 2019 17:38:05 +0000 (19:38 +0200)]
resourceloader: Omit default 'lang' and 'skin' params from load.php urls
lang=qqx and skin=fallback are the default values.
This change removes the default values from the load request of the
html5shiv module.
Before this change
<script src="/w/load.php?lang=qqx&modules=html5shiv&only=scripts&skin=fallback&sync=1"></script>
With this change
<script src="/w/load.php?modules=html5shiv&only=scripts&sync=1"></script>
Change-Id: Ie384ce0f7ab1bd0b6c2d3f0ca4a990c3cf3a7f15
Timo Tijhof [Thu, 13 Jun 2019 17:22:11 +0000 (18:22 +0100)]
selenium: Skip another flaky Rollback test
Bug: T220479
Change-Id: Ie523e719f5c7df959ef63930edaff1a80e09ff04
jenkins-bot [Thu, 13 Jun 2019 14:52:07 +0000 (14:52 +0000)]
Merge "DevelopmentSettings: Remove redundant CacheType overrides"
jenkins-bot [Thu, 13 Jun 2019 14:50:02 +0000 (14:50 +0000)]
Merge "installer: Detect APC for MainCacheType in CLI installer"
Timo Tijhof [Thu, 13 Jun 2019 01:08:53 +0000 (02:08 +0100)]
DevelopmentSettings: Remove redundant CacheType overrides
Follows-up
5a090c29822. This is no longer needed as of
7e0fb4fff6, which will add this to the generated LocalSettings.php
file automatically.
The installer now sets MainCacheType for CLI installs, the same
way as the web installer did already.
The secondary cache types have as default CACHE_ANYTHING (not
CACHE_NONE) and will automatically inherit from MainCacheType.
This commit unbreaks situations where developers have MainCache
set to something (e.g. Redis, or Memc) which after
5a090c29822
caused other types to go to APC instead of Memc.
Bug: T225496
Change-Id: Ib2824a6d316912daf09672de748726b91e4de449
Timo Tijhof [Thu, 13 Jun 2019 14:06:43 +0000 (15:06 +0100)]
installer: Detect APC for MainCacheType in CLI installer
The web installer did this already, but with the CLI installer,
the generated LocalSettings.php always contained the following
hardcoded:
$wgMainCacheType = CACHE_NONE;
Combined with the fact that in WMF CI, the generated local settings
is applied *after* the inclusion of Quibble settings and
DevelopmentSettings, meant that it was not possible to enable
object caching.
For now, make it match the behaviour of the web installer and thus
output $wgMainCacheType = CACHE_ACCELL if we detect a supported
implementation in the PHP runtime.
For later we should probably:
* Make this an option to install.php,
* or, change Quibble to append its overrides, instead of
prepending. So that DevelopmentSettings actually after the
generated LocalSettings.
Bug: T225496
Change-Id: I3f43cd054ce71d0f1b2395302e8ef9ee2f6b01c2
jenkins-bot [Thu, 13 Jun 2019 10:13:31 +0000 (10:13 +0000)]
Merge "Do move options checks before the move"
Aaron Schulz [Sun, 9 Jun 2019 07:22:45 +0000 (08:22 +0100)]
rdbms: implement strictor ownership of LoadBalancer by LBFactory
Change-Id: Idafd2cf05e016a5f88b90e4c4c74f82c212d61c9
jenkins-bot [Wed, 12 Jun 2019 23:54:07 +0000 (23:54 +0000)]
Merge "Database: Recognize USE queries as non-write queries"
Brad Jorsch [Mon, 3 Jun 2019 13:59:33 +0000 (09:59 -0400)]
DeleteLogFormatter: Handle missing ofield/nfield
ofield and nfield may be missing from old log entries. Take that into
account when processing.
Bug: T224815
Change-Id: I06dda3106bab9980f6fa7d515542e94a91c17f64
Roan Kattouw [Wed, 12 Jun 2019 23:29:50 +0000 (16:29 -0700)]
Database: Recognize USE queries as non-write queries
This should unbreak Ie7341a0e6c41, which switched
DatabaseMysql::doSelectDomain() from using doQuery() to using
executeQuery() for its USE query, which means it no longer
bypasses the isWriteQuery() check. This caused every USE query on a
replica DB to fail, because it was considered a write query.
Bug: T225682
Bug: T212284
Change-Id: Iecb8b9f6e64d08df8c64b3133078b5324e654ed1
Follows-Up: Ie7341a0e6c4149fc375cc357877486efe9e56eb9
jenkins-bot [Wed, 12 Jun 2019 21:28:33 +0000 (21:28 +0000)]
Merge "Add CompositeBlock class for enforcing multiple blocks"
jenkins-bot [Wed, 12 Jun 2019 19:58:18 +0000 (19:58 +0000)]
Merge "rdbms: add Database::executeQuery() method for internal use"
Derick Alangi [Wed, 12 Jun 2019 19:10:25 +0000 (20:10 +0100)]
PHPDoc: Fix non-carnonical order of elements in phpdoc
Change-Id: I21330e14629b5cd085f55c1b6c6232a4a6f4afcf
Thalia [Tue, 19 Mar 2019 18:56:10 +0000 (18:56 +0000)]
Add CompositeBlock class for enforcing multiple blocks
Create a CompositeBlock class which extends AbstractBlock and
adds the property $originalBlocks. This is for situations where
more than one block applies to a user/IP, and avoids the need
to choose just one of these blocks to enforce.
Behaviour of the resulting block is determined by combining the
strictest parameters of the original blocks.
Also add DatabaseBlock::newListFromTarget, which is similar to
DatabaseBlock::newFromTarget, but returns all relevant blocks,
rather than choosing the most specific one.
For tracking a CompositeBlock with a cookie, examine the
original blocks and only track the first trackable block that
is found.
Bug: T206163
Change-Id: I088401105ac8ceb2c6117c6d2fcdb277c754d882
Fomafix [Wed, 12 Jun 2019 18:05:55 +0000 (18:05 +0000)]
Merge "Remove unnecessary semi-colons"
jenkins-bot [Wed, 12 Jun 2019 16:28:33 +0000 (16:28 +0000)]
Merge "Fix and re-enable ApiQueryLanguageinfoTest"
jenkins-bot [Wed, 12 Jun 2019 16:18:10 +0000 (16:18 +0000)]
Merge "resourceloader: Convert test for FileModule versionHash to data provider"
jenkins-bot [Wed, 12 Jun 2019 15:44:39 +0000 (15:44 +0000)]
Merge "Set min-width on rcfilter dropdown"
Lucas Werkmeister [Fri, 7 Jun 2019 13:25:14 +0000 (15:25 +0200)]
Fix and re-enable ApiQueryLanguageinfoTest
Anomie discovered (T225244#
5250241) that we need to clear the language
cache here; with that, the test should work again, so re-enable it.
Bug: T225244
Change-Id: I67e8446a4ff64d12ab3a3a52a432a728d4139a69
Jan Drewniak [Wed, 12 Jun 2019 11:02:12 +0000 (13:02 +0200)]
Removes updateIfHeightChanged override on rcfilters
This override causes the rcfilter dropdown menu to be incorrectly
positioned when the height of the "tag box" changes,
i.e. when a tag is added and an additional row is created.
This override was originally added as part of T198399 in commit
a9fc286, but given
bb15314 prevents the resize event from firing on
pageload, that change should mitigate the performance impact of
this function.
Bug: T225499
Change-Id: I4a296c7d3c277d5415144aee6434b63a5035d275
Timo Tijhof [Wed, 12 Jun 2019 14:05:09 +0000 (15:05 +0100)]
resourceloader: Convert test for FileModule versionHash to data provider
In prep for the next commit.
Change-Id: If08c3d8b769b6ec03faf8ff24f216ce9f670f6ac
Derick Alangi [Wed, 12 Jun 2019 13:35:59 +0000 (14:35 +0100)]
Remove unnecessary semi-colons
Change-Id: I9eb65bdfbd3aa581effc14ead801b9e89b0359c3
Gergő Tisza [Wed, 12 Jun 2019 11:41:15 +0000 (13:41 +0200)]
Do move options checks before the move
This is both more correct conceptually (if the move-subpages
permission check depends on the page content, we want that to be
the content that is getting moved) and hopefully more robust
(whereas doing permission checks on a title just after having
moved it might run into issues with replication lag).
Also, permission checks can be expensive so skip the move-subpage
check when the user did not request moving subpages anyway. And
replace the deprecated method.
Bug: T225366
Change-Id: I9809b2a5bbae4006d5c5389dfd7c04f20f7da8fd
Jan Drewniak [Wed, 12 Jun 2019 10:46:32 +0000 (12:46 +0200)]
Set min-width on rcfilter dropdown
Setting a min-width on the body of the rcfilter dropdown menu
prevents it from dropping to width=0 when the browser is
narrower than 650px.
Bug: T225499
Change-Id: I8e7281994af45a52b994fe277fc513db2ae2c4d6
jenkins-bot [Tue, 11 Jun 2019 23:11:58 +0000 (23:11 +0000)]
Merge "ResourceLoaderOOUIIconPackModule: Always use MW core 'localBasePath'"
Bartosz Dziewoński [Tue, 11 Jun 2019 22:50:02 +0000 (00:50 +0200)]
ResourceLoaderOOUIIconPackModule: Always use MW core 'localBasePath'
Otherwise, extensions defining icon pack modules in extension.json
would need to specify "localBasePath": "../..", which is silly.
Follow-up to
a8dae2212cc5e23e181023af2ba1891078b14355.
Change-Id: If8f02867955d649c809b6b41de0f77e594b633d6
Gergő Tisza [Sat, 2 Mar 2019 03:06:54 +0000 (19:06 -0800)]
Exempt structure tests from @covers checks
@covers does not make any sense for structure tests, which either
do not cover any PHP lines (they test things like configuration or
messages), or cover lines which cannot be determined at the time
of writing the tests (e.g. they cover all classes implementing a
certain interface). Requiring @coversNothing to be manually added
for all of them is a waste of developer time.
tests/phpunit/suite.xml has forceCoversAnnotation=true so removing
the annotations will not change test coverage, these files will
still be skipped.
Change-Id: I27cb58e92341b9b1a76f109701f5bc843adbaa9b
jenkins-bot [Tue, 11 Jun 2019 20:55:44 +0000 (20:55 +0000)]
Merge "Inline trivial object creation helpers in tests"
jenkins-bot [Tue, 11 Jun 2019 20:22:38 +0000 (20:22 +0000)]
Merge "jquery.suggestions: Load initial suggestions only when focused"
jenkins-bot [Tue, 11 Jun 2019 19:51:21 +0000 (19:51 +0000)]
Merge "Installer: Update link to PHP intl away from old PECL package"
Karsten Hoffmeyer [Tue, 11 Jun 2019 19:24:16 +0000 (21:24 +0200)]
Installer: Update link to PHP intl away from old PECL package
PHP 5.5 was the last version supported by PECL intl package. Now the
PHP intl extension is used instead.
Bug: T225558
Change-Id: I68cb7a549c899e69da9a8cfea5a69b9acb41e8ae
Derick Alangi [Sat, 18 May 2019 13:13:46 +0000 (14:13 +0100)]
maintenance: Use addDescription() instead of accessing mDescription directly
Change-Id: I705a3fab4a6b151b81b45a3e2d7559f554986378
Bartosz Dziewoński [Mon, 12 Feb 2018 19:41:44 +0000 (20:41 +0100)]
Allow loading styles for arbitrary OOUI icon packs
You can now create ResourceLoader modules for arbitrary sets of OOUI
icons. This is an alternative to I8af783666a2b23a938af93c1b56fee619219eaf5.
Update dependencies of OOUI's modules to use custom icon packs instead
of default icon packs.
Bug: T160690
Change-Id: Icf9560da79c91e56c7a3f4c0de01dd057f5aa00d
jenkins-bot [Tue, 11 Jun 2019 17:42:57 +0000 (17:42 +0000)]
Merge "resources: Remove unused jquery.effects.* modules"
jenkins-bot [Tue, 11 Jun 2019 15:58:09 +0000 (15:58 +0000)]
Merge "Normalize dir path in AutoLoaderStructureTest"
jenkins-bot [Tue, 11 Jun 2019 15:16:00 +0000 (15:16 +0000)]
Merge "Move cookie-blocking methods to BlockManager"
Aaron Schulz [Fri, 8 Mar 2019 01:53:39 +0000 (17:53 -0800)]
objectcache: add object segmentation support to BagOStuff
Use it for ApiStashEdit so that large PaserOutput can be stored.
Add flag to allow for value segmentation on set() in BagOStuff.
Also add a flag for immediate deletion of segments on delete().
BagOStuff now has base serialize()/unserialize() methods.
Bug: T204742
Change-Id: I0667a02612526d8ddfd91d5de48b6faa78bd1ab5
Derick Alangi [Fri, 19 Apr 2019 18:25:14 +0000 (19:25 +0100)]
resources: Remove unused jquery.effects.* modules
* jquery.ui.effect-bounce [removed]
* jquery.ui.effect-explode [removed]
* jquery.ui.effect-fold [removed]
* jquery.ui.effect-pulsate [removed]
* jquery.ui.effect-slide [removed]
* jquery.ui.effect-transfer [removed]
Bug: T219604
Change-Id: I9a9acd8ed3d4a3b6c50f57fbb11e6038713a2a09
jenkins-bot [Tue, 11 Jun 2019 14:39:55 +0000 (14:39 +0000)]
Merge "Have ServiceContainer implement PSR-11"
jenkins-bot [Tue, 11 Jun 2019 14:23:24 +0000 (14:23 +0000)]
Merge "Replace some uses of deprecated wfFindFile() and wfLocalFile()"
jenkins-bot [Tue, 11 Jun 2019 14:20:09 +0000 (14:20 +0000)]
Merge "Fix return type of File::restore()"
Thalia [Thu, 6 Jun 2019 18:00:20 +0000 (14:00 -0400)]
Move cookie-blocking methods to BlockManager
Move the cookie blocking logic into one place. Specifically, move
these methods to the BlockManager:
* User::trackBlockWithCookie
* DatabaseBlock::setCookie
* DatabaseBlock::clearCookie
* DatabaseBlock::getCookieValue
* DatabaseBlock::getIdFromCookieValue
* AbstractBlock::shouldTrackWithCookie
After this, BlockManager::trackBlockWithCookie should be called to
track a block, and BlockManager::clearBlockCookie should be called
to unset the cookie. The other methods in the above list are
helper methods that are made private or marked internal.
Also update places in core that call User::trackBlockWithCookie to
BlockManager::trackBlockWithCookie
Bug: T225141
Change-Id: I818962c6932c01c841a549a101637e00a7593e48
Aaron Schulz [Wed, 22 May 2019 20:31:59 +0000 (13:31 -0700)]
rdbms: add Database::executeQuery() method for internal use
This shares reconnection and retry logic but lacks some of the
restrictions applied to queries that go through the public query()
interface.
Use this in a few places such as doSelectDomain() for mysql/mssql.
Bug: T212284
Change-Id: Ie7341a0e6c4149fc375cc357877486efe9e56eb9
jenkins-bot [Tue, 11 Jun 2019 13:53:05 +0000 (13:53 +0000)]
Merge "Set cache types to APC/APCu/WinCache in DevelopmentSettings.php"
Derick Alangi [Tue, 14 May 2019 17:00:34 +0000 (18:00 +0100)]
Replace some uses of deprecated wfFindFile() and wfLocalFile()
These global functions were deprecated in 1.34 and services made
available to replace them. See services below;
* wfFindFile() - MediaWikiServices::getInstance()->getRepoGroup()->findFile()
* wfLocalFind() - MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()->newFile()
NOTES:
* wfFindFile() and wfLocalFind() usages in tests have been ignored
in this change per @Timo's comments about state of objects.
* includes/upload/UploadBase.php also maintained for now as it causes
some failures I don't fully understand, will investigate and handle
it in a follow up patch.
* Also, includes/MovePage.php
Change-Id: I9437494de003f40fbe591321da7b42d16bb732d6
Lucas Werkmeister [Tue, 11 Jun 2019 12:35:23 +0000 (14:35 +0200)]
Fix return type of File::restore()
The only real implementation, LocalFile::restore(), has not returned an
int|bool since commit
ca76169bbe, almost twelve years ago. (MediaWiki
code search [1] finds no other implementations.)
This discrepancy became more visible when we moved from wfLocalFile() to
FileRepo::findFile(), because wfLocalFile() (incorrectly, as it just
calls FileRepo::findFile()) is declared to return a LocalFile, rather
than any File as FileRepo::findFile() does, so the incorrect return type
on File::returnType() was not seen by wfLocalFile() users.
[1]: https://codesearch.wmflabs.org/search/?q=function%20restore\(&files=\.php%24
Change-Id: Idaf73074eaddc5be1782ae484d75a0f0c129b980
jenkins-bot [Tue, 11 Jun 2019 11:54:07 +0000 (11:54 +0000)]
Merge "Remove return value from SpecialUploadStash::execute"
jenkins-bot [Tue, 11 Jun 2019 11:53:59 +0000 (11:53 +0000)]
Merge "api: Temporarily disable ApiQueryLanguageinfoTest"
Amir Sarabadani [Tue, 11 Jun 2019 11:21:54 +0000 (13:21 +0200)]
Set cache types to APC/APCu/WinCache in DevelopmentSettings.php
Bug: T225496
Change-Id: I14dd3fea9795a501e29383a3cae2b3e9a0077e69
jenkins-bot [Tue, 11 Jun 2019 00:28:34 +0000 (00:28 +0000)]
Merge "Allow MediaWikiTestCase::editPage to use given User"
jenkins-bot [Mon, 10 Jun 2019 23:57:23 +0000 (23:57 +0000)]
Merge "build: Upgrade stylelint-config-wikimedia from 0.5.0 to 0.6.0 and make pass"
jenkins-bot [Mon, 10 Jun 2019 23:50:22 +0000 (23:50 +0000)]
Merge "jquery.suggestions: Combine two isRTL checks"
jenkins-bot [Mon, 10 Jun 2019 23:44:07 +0000 (23:44 +0000)]
Merge "resourceloader: Add explicit tests for isValidModuleName()"
jenkins-bot [Mon, 10 Jun 2019 23:43:21 +0000 (23:43 +0000)]
Merge "resourceloader: Warn on ResourceLoader::construct without Config"
James D. Forrester [Mon, 3 Jun 2019 21:04:54 +0000 (14:04 -0700)]
build: Upgrade stylelint-config-wikimedia from 0.5.0 to 0.6.0 and make pass
Change-Id: I062bed7889cdfcc48eab9594200fc1d4767dda8c
jenkins-bot [Mon, 10 Jun 2019 21:40:46 +0000 (21:40 +0000)]
Merge "build: Commit package-lock.json"
jenkins-bot [Mon, 10 Jun 2019 21:28:20 +0000 (21:28 +0000)]
Merge "mediawiki.Title: Remove dead code and streamline newFromUserInput()"
James D. Forrester [Mon, 10 Jun 2019 21:24:21 +0000 (14:24 -0700)]
build: Commit package-lock.json
First step towards making our developers less vulnerable to
credential-stealing attacks through the npm registry.
Per T211784 and
5a300c77c302, mediawiki-core now uses Node 10
for at least one of the jobs that runs 'npm install'.
Change-Id: Ia4c59d3fc18ce0e13a4e5c3a00804e54dcb015a3
jenkins-bot [Mon, 10 Jun 2019 21:23:33 +0000 (21:23 +0000)]
Merge "foreign-resources.yaml: Add jquery.chosen"
jenkins-bot [Mon, 10 Jun 2019 20:27:02 +0000 (20:27 +0000)]
Merge "watcheditem: Do not create the same TitleValue object twice"
jenkins-bot [Mon, 10 Jun 2019 20:19:28 +0000 (20:19 +0000)]
Merge "Localisation updates from https://translatewiki.net."
jenkins-bot [Mon, 10 Jun 2019 20:18:53 +0000 (20:18 +0000)]
Merge "Fix documentation of Maintenance::updateSearchIndex"
Translation updater bot [Mon, 10 Jun 2019 20:18:44 +0000 (22:18 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I695bfdbedde246b905e0fb7573a4070ffb0e4f78
Umherirrender [Fri, 7 Jun 2019 14:28:31 +0000 (16:28 +0200)]
watcheditem: Do not create the same TitleValue object twice
Minor optimization in getWatchedItemsForUser(). Follows-up
7c12727fff0.
Change-Id: I29f40f2c09c334eea33c7aaf351e1f1a93de9c13
jenkins-bot [Mon, 10 Jun 2019 19:59:10 +0000 (19:59 +0000)]
Merge "Remove RELEASE-NOTES-1.33"
MusikAnimal [Mon, 3 Jun 2019 19:52:46 +0000 (15:52 -0400)]
Allow MediaWikiTestCase::editPage to use given User
Sometimes you need to edit pages with a non-sysop.
This is a follow-up to I9e48f7c00efbce8c2de3f5db3a74462d47ae8f64
Change-Id: I5a101638f57709c343a2e42ca0ae11527bee8cce
Kunal Mehta [Thu, 6 Jun 2019 01:12:45 +0000 (21:12 -0400)]
Have ServiceContainer implement PSR-11
Bug: T222410
Change-Id: Ifab2602972ba385a975a0d8279605d2c4802ca9f
Depends-On: I5629e287208b2f038753d88d328989ebdc934c0f
Timo Tijhof [Mon, 10 Jun 2019 15:00:16 +0000 (16:00 +0100)]
resourceloader: Warn on ResourceLoader::construct without Config
The only remaining use of 'new ResourceLoader' is in tests, which have
been migrated in this commit to either passing the real config explicitly
(for integration tests), or by passing a HashConfig from a new
'getMinimalConfig' method which has only the keys required for the tests
to pass (e.g. avoid any ConfigExeption for unknown keys).
Also clean up some related code quality issues:
* Migrate wfScript() to $conf->get() so that the local Config is used,
instead of implicitly using global variables. This isn't deprecated for
MediaWiki generally, but done here to prepare ResourceLoader for becoming
a standalone library.
* Remove mocking of 'CacheEpoch' config, this is no longer used anywhere
in ResourceLoader.
* Change EmptyResourceLoader to use the minimal config by default and
remove code duplication by calling the parent.
Update the small number of uses that are integration tests, to explicitly
pass in the live config as needed. And for the one case that tests the
'startup' module, it no longer needs to register it manually given this
is part of ResourceLoader::__construct() by default.
Bug: T32956
Change-Id: I127346fd530fa66f205156e545758b1c29d0fac0
Adam Wight [Thu, 6 Jun 2019 10:55:32 +0000 (12:55 +0200)]
selenium: Skip flaky Rollback test
Sometimes the element doesn't appear. This is breaking during gate-and-submit,
so skipping until it can be fixed properly.
Bug: T219440
Change-Id: I7286eb5499e34146acf5da3180b665436569a18c
Timo Tijhof [Mon, 10 Jun 2019 15:13:19 +0000 (16:13 +0100)]
api: Temporarily disable ApiQueryLanguageinfoTest
Bug: T225244
Change-Id: I0f778f1b4f8bd53bd8d52540afbe6927a14b583a
jenkins-bot [Mon, 10 Jun 2019 15:00:12 +0000 (15:00 +0000)]
Merge "resourceloader: Add coverage for DerivativeRLContext::getDirection inheritance"
Timo Tijhof [Mon, 10 Jun 2019 14:25:24 +0000 (15:25 +0100)]
resourceloader: Add coverage for DerivativeRLContext::getDirection inheritance
This was the only case not covered, possibly due to a copy-paste
mistake when writing the test.
Change-Id: I1d01a1191da15162f301cea4082c0f1f481cece7
Derick Alangi [Sun, 26 May 2019 21:46:15 +0000 (22:46 +0100)]
Use AtEase::quietCall() instead of Wikimedia\quietCall()
Wikimedia\quietCall() is deprecated and AtEase is here for use.
I would have loved to do restoreWarnings() and suppressWarnings()
in this same patch set but will continue the work for a later patch.
Bug: T182273
Change-Id: I43e3a5f378c99b5c40883b35ba133cbd126fc433
Fomafix [Wed, 5 Jun 2019 20:08:48 +0000 (22:08 +0200)]
jquery.suggestions: Combine two isRTL checks
Also update comment about the direction.
Change-Id: Iba9e925eef3148c2964d51cf5e55402dc85d65dc
jenkins-bot [Mon, 10 Jun 2019 13:48:27 +0000 (13:48 +0000)]
Merge "tidy: Remove unused var and define $parts var to avoid undefined error"
jenkins-bot [Mon, 10 Jun 2019 13:44:50 +0000 (13:44 +0000)]
Merge "jquery.suggestions: Use document.documentElement.clientWidth"
Fomafix [Wed, 5 Jun 2019 06:01:36 +0000 (08:01 +0200)]
jquery.suggestions: Load initial suggestions only when focused
Firefox restores the value of the search field on browser history back
on some special pages with OOUI search suggestions. In this case the
value of the search field gets also changed before JavaScript gets
initialized and the search suggestions get loaded.
This change loads the initial suggestions only when the search field is
focused and the value is changed before initializing JavaScript.
Bug: T224952
Change-Id: I30d334ae61b40666f14c2b6f82fe7f66ebc8fba0
jenkins-bot [Mon, 10 Jun 2019 13:41:20 +0000 (13:41 +0000)]
Merge "jquery.suggestions: Use Object.create( null )"
jenkins-bot [Mon, 10 Jun 2019 13:40:09 +0000 (13:40 +0000)]
Merge "jquery.suggestions: Remove public object $.suggestions"
Derick Alangi [Mon, 15 Apr 2019 16:07:31 +0000 (17:07 +0100)]
tidy: Remove unused var and define $parts var to avoid undefined error
Remove unused variable $parent in RemexCompatMunger::comment(). Also,
RemexMungerData::dump() could have a possibility that all checks fail
and $parts is not defined. There are two ways we can handle this, i.e.
either by doing `$parts = []`(setting $parts to an empty array) or by
safe guarding using an `isset()` check.
This patch uses the former so that $parts is defined and can be used
below in the code.
Change-Id: I4d601a6fe36a1dce0945686cb9880336d08338be
Fomafix [Wed, 29 May 2019 22:56:46 +0000 (00:56 +0200)]
jquery.suggestions: Use Object.create( null )
Object.create( null ) creates an Object without predefined methods like
hasOwnProperty or constructor. This allow to use
key in object
instead of
Object.prototype.hasOwnProperty.call( object, key )
even if the key is 'constructor'.
Change-Id: I6ef9019309022a2a990deda685ba71ca61b86df3
jenkins-bot [Mon, 10 Jun 2019 05:49:20 +0000 (05:49 +0000)]
Merge "Drop SpecialPage::getTitle()"
jenkins-bot [Sun, 9 Jun 2019 20:13:23 +0000 (20:13 +0000)]
Merge "registration: Deprecate ParserTestFiles in extension.json"
jenkins-bot [Sun, 9 Jun 2019 17:33:40 +0000 (17:33 +0000)]
Merge "objectcache: Make BagOStuff::getCurrentTime() public"
Lucas Werkmeister [Sat, 8 Jun 2019 16:30:20 +0000 (18:30 +0200)]
objectcache: Make BagOStuff::getCurrentTime() public
If another cache wraps a BagOStuff, it may need to know about the
BagOStuff’s notion of the current time, which may be mocked and differ
from the real time.
Change-Id: I40f4085d4cf549314394d3140cccb1fe4e48690a
jenkins-bot [Sun, 9 Jun 2019 16:54:59 +0000 (16:54 +0000)]
Merge "build: Set opcache.enable_cli=1 for Travis CI builds"
RazeSoldier [Thu, 6 Jun 2019 08:57:51 +0000 (08:57 +0000)]
build: Set opcache.enable_cli=1 for Travis CI builds
Make test process faster. The code refer <https://docs.travis-ci.com/user/languages/php/>.
Bug: T225078
Change-Id: I8c4e87f75108cfbece17506aa630b205aabaab4b