lhc/web/wiklou.git
14 months agoBump and prep 1.34.0 1.34.0
Reedy [Thu, 19 Dec 2019 13:32:41 +0000 (13:32 +0000)]
Bump and prep 1.34.0

Change-Id: I57b1934858bd88a9d04796d236be5a3cd3173e6c

14 months agoRELEASE-NOTES-1.34: Add note for T212067 backport
James D. Forrester [Wed, 18 Dec 2019 11:53:21 +0000 (11:53 +0000)]
RELEASE-NOTES-1.34: Add note for T212067 backport

Change-Id: Ibedb07ce92820ff94380a390afe1001c279c8598

14 months agoTests for an old PHP bug in parse_url
Brad Jorsch [Mon, 17 Dec 2018 18:20:12 +0000 (13:20 -0500)]
Tests for an old PHP bug in parse_url

It would get confused by URLs with a query portion but no path.

We no longer support any vulnerable versions of PHP, but it would still
be useful to have these tests.

Bug: T212067
Change-Id: I15c15161a668115d68eb2e2f8004826b47148fc1
(cherry picked from commit 489bb4fb981cfe2e81b647c498e329033a4bc72b)

14 months agoUpdate RELEASE-NOTES
Reedy [Tue, 17 Dec 2019 21:12:30 +0000 (21:12 +0000)]
Update RELEASE-NOTES

Change-Id: I10c0115d9f1591dd2e0ade8497b168247bf70c05

14 months agomedia: Log and fail gracefully on invalid EXIF coordinates
Thiemo Kreuz [Tue, 26 Nov 2019 08:54:05 +0000 (09:54 +0100)]
media: Log and fail gracefully on invalid EXIF coordinates

The $coord value is a value extracted from the EXIF section of an
image file. We expect it to be a float, but there is no guarantee this
is the case. It could, for example, be an empty string.

I suggest this trivial fix. It does have the following effects:
* Instead of logging a PHP notice when floor() hits something that is
  not a number, I try to log something that's more useful for later,
  more in-depth debugging. Note this log call isn't necessarily meant
  to stay, but to find an even better fix for this issue.
* I return the string as it is. If it's "foo", the user will see "foo"
  instead of "0° 0′ 0″ N", which wasn't helpful.

Also note how wrong and misleading the PHPDoc block for this function
was.

Bug: T226751
Change-Id: I1ca98728de4113ee1ae4362bd3e62b425d589388
(cherry picked from commit f6787ede2db29fcc2c1923e23eaa2e9bf86522a1)

14 months agoNewPagesPager: Fix namespace query conditions
DannyS712 [Tue, 17 Dec 2019 06:22:57 +0000 (06:22 +0000)]
NewPagesPager: Fix namespace query conditions

Bug: T240924
Change-Id: I28d276cae0518386cac3f9d571ba09e9eff6678b
(cherry picked from commit b390ef6e5825e8906667d7a755d70b3478ce47b7)

14 months agordbms: Log debug message traces as 'exception.trace' instead of 'trace'
sbassett [Wed, 4 Dec 2019 20:19:52 +0000 (14:19 -0600)]
rdbms: Log debug message traces as 'exception.trace' instead of 'trace'

Code cleanup and hardening (see also: T234014) of Database-related
lib code in MediaWiki core.

Bug: T233342
Change-Id: I3c968f4f5300374253dc80d99596cac50fbeb59e
(cherry picked from commit 2e11b14455b44b8fcfd528da5efcc214902c2ffb)

14 months agoSECURITY: Do not allow user scripts on Special:PasswordReset
Amir Sarabadani [Sat, 7 Dec 2019 22:36:42 +0000 (23:36 +0100)]
SECURITY: Do not allow user scripts on Special:PasswordReset

Bug: T192134
Change-Id: If5e91452f2e569476626bcf650ba4efaa122952c

14 months agoReplace deprecated lSize with lLen
Paladox [Tue, 3 Dec 2019 18:12:47 +0000 (18:12 +0000)]
Replace deprecated lSize with lLen

lSize is an alias to lLen according to [1]

[1] https://github.com/phpredis/phpredis/blob/9f4ededa4139f0af324aab56773f26be5a9d1783/README.markdown#L2148

Bug: T239734
Change-Id: I5b72fbe61e313511b69e8d2e96c2042742370b85
(cherry picked from commit fac9054e3f894962b92304fb9ca610f07b0b8549)

14 months agoApiEditPage: Test for bad redirect targets
Brad Jorsch [Mon, 2 Dec 2019 14:39:03 +0000 (09:39 -0500)]
ApiEditPage: Test for bad redirect targets

Apparently everything downstream assumes callers already handled
interwiki titles.

See also T239466 for related code-hardening.

Bug: T239428
Change-Id: Ie54f366986056c876eade0fcad6c41f70b8b8de8
(cherry picked from commit 9084591e104fc10f004044f552b47ad27e7d763b)

14 months agoUpdate RELEASE-NOTES-1.34
Reedy [Wed, 4 Dec 2019 20:49:28 +0000 (20:49 +0000)]
Update RELEASE-NOTES-1.34

Change-Id: Ie9c70854e759f848f6907b79b9ca630504958517

14 months agoMimic CURLOPT_POST in GuzzleHttpRequest
Moritz Schubotz (physikerwelt) [Fri, 22 Nov 2019 15:11:26 +0000 (16:11 +0100)]
Mimic CURLOPT_POST in GuzzleHttpRequest

The MWHttpRequest is implemented by the
CurlHttpRequest class and also the
GuzzleHttpRequest class. However, curl based rendering set
the CURLOPT_POST which implies that the 'Content-Type'
header defaults to 'application/x-www-form-urlencoded'.
To homgonize the functionality this patch mimics the
curl behaviour in Guzzle.

Bug: T232866
Change-Id: Id60a8de18e5f1e750a3bde23bd8b0deca4071165
(cherry picked from commit 5e3a0e73955d6324c5dd6e12fbe36d3ba203d9db)

14 months agoMark options as requiring parameters in addSite.php
lens0021 [Mon, 2 Dec 2019 01:32:25 +0000 (10:32 +0900)]
Mark options as requiring parameters in addSite.php

Bug: T239561
Change-Id: Ibd967da45f32c8ea58b8997f15d26ab06f1e14cb

14 months agoAvoid using deprecated phpredis::delete() alias
Paladox [Mon, 2 Dec 2019 22:33:08 +0000 (22:33 +0000)]
Avoid using deprecated phpredis::delete() alias

Bug: T227461
Change-Id: I5eb2fa42d61e4757b11b6eb909c04dafb40923a1

14 months agoLocalisationCache: Don't instantiate ResourceLoader
daniel [Tue, 26 Nov 2019 19:33:10 +0000 (20:33 +0100)]
LocalisationCache: Don't instantiate ResourceLoader

When clearing the LocalisationCache, avoid instantiating a ResourceLoader
instance. Doing so introduces a circular dependency among service
instances.

This patch introduces a static method for clearing the MessageBlobStore
without the need for a ResoruceLoader instance.

Bug: T231866
Change-Id: I404e64713fee6a534ba014981cef78af0b91f2aa
(cherry picked from commit 41415deda4c66ba52194c4df51c54c367f1f10b9)

14 months agoFix support for HTTP/2 in MultiHttpClient
Paladox [Sun, 1 Dec 2019 17:59:17 +0000 (17:59 +0000)]
Fix support for HTTP/2 in MultiHttpClient

Under buster, curl uses HTTP/2 (confirmed when running eval):

Buster:
GET xxx HTTP/2

Stretch:
GET xxx HTTP/1.1

The code presumes that it will always be HTTP/1.x.

We fix this by adjusting the regex to match HTTP2.

Bug: T232866
Change-Id: Ibde6036048d5939508df143ec5956abcd0718ad1

14 months agoMake sure DBLoadBalancerFactory service is not disabled
RazeSoldier [Wed, 25 Sep 2019 14:54:13 +0000 (22:54 +0800)]
Make sure DBLoadBalancerFactory service is not disabled

After b873e929, when the CLI installation failed, the script will throw
a ServiceDisabledException.
This is because the installer disables DBLoadBalancerFactory service
during instantiation and throws the exception because the installation
failed to restore the service.
So I check if the service is enabled before try commit
the master changes.

Bug: T229601
Change-Id: Ia7589d14ee55bcb03a64856b6dd2c81d8bda783c
(cherry picked from commit eadde762b03ed94c687788ed3e0d9c65e5046fb2)

15 months agoUpdate RELEASE-NOTES-1.34 for backports
Reedy [Tue, 26 Nov 2019 11:35:45 +0000 (11:35 +0000)]
Update RELEASE-NOTES-1.34 for backports

Change-Id: I954c8a7ea2f988783c9e23c8206f24eccd343cd2

15 months agoFix ''
Reedy [Tue, 26 Nov 2019 11:19:21 +0000 (11:19 +0000)]
Fix ''

Change-Id: Iac30bc682344a5d3e550c1af9c66962998fffed2

15 months agoSet MCR migration stage to SCHEMA_COMPAT_NEW.
daniel [Mon, 28 Oct 2019 20:13:46 +0000 (21:13 +0100)]
Set MCR migration stage to SCHEMA_COMPAT_NEW.

This disables writing to the old schema in DefaultSettings.php.

Bug: T231673
Change-Id: I799bfb76c10fd0c0dc791e7380fce0159d81c2d3
(cherry picked from commit 1a917bab4cfa3a957e4cda1959050a2c2058ee4c)

15 months agoWikiExporter: Remove unnecessary check for SCHEMA_COMPAT_WRITE_OLD flag
daniel [Mon, 28 Oct 2019 20:09:44 +0000 (21:09 +0100)]
WikiExporter: Remove unnecessary check for SCHEMA_COMPAT_WRITE_OLD flag

WikiExporter used to require SCHEMA_COMPAT_WRITE_OLD to be enabled,
until that requirement was fixed in I5ea972bb07ca1cfb3a2ad8ef120aef7.
However, I failed to remove the explicit check for the flag at the
time, causing all exports to fail in SCHEMA_COMPAT_NEW mode. This
change removes the obsolete check.

Bug: T236735
Change-Id: I809ed4e2f1f30fdc4bd817f815d733d8a62f3d4f
(cherry picked from commit d9209707cc62ea2eb0f0fe9d2c79e56a8cc87552)

15 months agoUpdate git submodules
zoranzoki21 [Mon, 4 Nov 2019 20:55:42 +0000 (21:55 +0100)]
Update git submodules

* Update extensions/OATHAuth from branch 'REL1_34'
  to a1b93f1f7680829f7d4104469627d53358cf00ec
  - Add missing oathauth-module-invalid message

    Bug: T228269
    Change-Id: I7f3ceaf27cb13bbf1acc0e7784f405fef35e3001

15 months agoStorage: SqlBlobStore no longer needs Language object
Timo Tijhof [Tue, 1 Oct 2019 16:20:45 +0000 (17:20 +0100)]
Storage: SqlBlobStore no longer needs Language object

Constructing a Language object in order to initialize the
BlobStoreFactory service causes a circular dependency
(see T231866).

SqlBlobStore was using the Language object to all iconv.
But nothing language specific is done in Language::iconv,
so we can just inline the call.

Bug: T231866
Change-Id: I90c25decbcff10ea762a2c7474a12fd2041b3abc

15 months agoAdd $wgDiffEngine
Brad Jorsch [Tue, 5 Nov 2019 15:07:06 +0000 (10:07 -0500)]
Add $wgDiffEngine

The immediate use case is for testing, where some tests need to use the
PHP implementation even when wikidiff2 is installed.

Bug: T237049
Change-Id: I41dc4c0933429065d7638f518ec31f0a056afc41
(cherry picked from commit f3058c81b9bbdede6eeb70503ecc44a6ba423e0d)

15 months agoAdd section for changes after 1.34.0-rc.1
Reedy [Tue, 5 Nov 2019 22:06:47 +0000 (22:06 +0000)]
Add section for changes after 1.34.0-rc.1

Change-Id: I4a4aa7ec1f9e93d36e414057d0209a531bfaadde

15 months agoBump $wgVersion 1.34.0-rc.1 1.34.0-rc.1
Reedy [Tue, 5 Nov 2019 21:39:34 +0000 (21:39 +0000)]
Bump $wgVersion 1.34.0-rc.1

Change-Id: Ia14a51d05256e8110359865f7c239fd13d700f40

15 months agoUpdate RELEASE-NOTES
Reedy [Mon, 4 Nov 2019 18:24:40 +0000 (18:24 +0000)]
Update RELEASE-NOTES

Change-Id: Ia60600afe56fdb50ff255e189eac51a882715cbb

15 months agoHard deprecate Parser::disableCache()
C. Scott Ananian [Mon, 4 Nov 2019 19:31:21 +0000 (14:31 -0500)]
Hard deprecate Parser::disableCache()

Among deployed extensions, only used in the Quiz extension.

Full list of uses (some false positives):
https://codesearch.wmflabs.org/search/?q=disableCache&i=nope&files=&repos=

Depends-On: I956a88120d07d76d1afa9d06e95d31055f9b07f1
Change-Id: I6419754de6cbc01af07b6c0eafb8396bd720a58d
(cherry picked from commit 8dbc866e91d5a06cc1c2ca70c48c6752ddb48944)

15 months agoUpdate git submodules
Reedy [Mon, 4 Nov 2019 18:33:19 +0000 (18:33 +0000)]
Update git submodules

* Update extensions/OATHAuth from branch 'REL1_34'
  to 42cb55cef1b127ee53e256f55dedce4f37774fd2
  - Enable schemaUpdateTOTPToMultipleKeys

    Change-Id: I6cb10a877652a10412664e124f94c5d0c58932fe

15 months agoDo not insert page titles into querycache.qc_value
mszabo-wikia [Wed, 14 Mar 2018 14:38:14 +0000 (15:38 +0100)]
Do not insert page titles into querycache.qc_value

querycache.qc_value column is used to store a numeric value related
to the query results, generally a COUNT(*) aggregation or timestamp,
but some query pages insert the page title here after passing it through
PHP's intval() function to parse it into a number.
While this will cause 0 to be inserted for pages whose title is not numeric
(i.e. most titles), a DB error may occur for numeric page titles that exceed
the maximum value for unsigned integers, depending on relevant DB settings,
such as MySQL's strict mode.[1]

This patch changes query pages not to insert page titles into the qc_value
column. Also, it adds the getOrderFields() method to query pages that were
missing them, to ensure that the result set inserted into the querycache
table is correctly ordered by title.

---
[1] https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict

Bug: T181658
Change-Id: I1ef297257c6f419826ba4ffc6e875389ccec46db
(cherry picked from commit 335fabf5fba49fa43c0e876996baa165a7ff4350)

15 months agoParamValidator: Flag as unstable for 1.34
Brad Jorsch [Fri, 1 Nov 2019 17:48:59 +0000 (13:48 -0400)]
ParamValidator: Flag as unstable for 1.34

Iea6d4a1d0 isn't likely to make it, and I don't want to have to
support the architectural mistakes it's fixing in 1.35.

Change-Id: Icd161779d4e2eb60c507a5a4400f9432741c72eb
(cherry picked from commit ff70806ef1e142c67841b049b7b943170558ed78)

15 months agoFix for ArticleRevisionViewCustom hook in DifferenceEngine.php
Yaron Koren [Mon, 28 Oct 2019 13:30:43 +0000 (13:30 +0000)]
Fix for ArticleRevisionViewCustom hook in DifferenceEngine.php

Was missing a parameter, which actually made this hook unusable.

Bug: T236628
Change-Id: I6e260cd49f7083f34d4218712edf7d91d2f11ee9
(cherry picked from commit b10d0fa09d52fc6bd3d645fb39175b45973bb54b)

15 months agoHard deprecate `$wgSysopEmailBans`
DannyS712 [Fri, 1 Nov 2019 01:39:25 +0000 (01:39 +0000)]
Hard deprecate `$wgSysopEmailBans`

Bug: T232169
Change-Id: Icfe02595fc92738c279fa6764f955aa00818088d
(cherry picked from commit 42566fce93af715465f145618d37b7b6dd030862)

15 months agoMerge "Disable $wgServer autodetection to prevent cache poisoning attacks" into REL1_34
jenkins-bot [Thu, 31 Oct 2019 00:57:49 +0000 (00:57 +0000)]
Merge "Disable $wgServer autodetection to prevent cache poisoning attacks" into REL1_34

15 months agoDisable $wgServer autodetection to prevent cache poisoning attacks
Kunal Mehta [Fri, 19 Jul 2019 04:04:41 +0000 (00:04 -0400)]
Disable $wgServer autodetection to prevent cache poisoning attacks

Since MediaWiki 1.18, $wgServer has been automatically set by the web installer
when it generates LocalSettings.php, so this shouldn't be an issue for most
wikis. The CLI installer now supports a --server optional parameter to
specify $wgServer, otherwise it'll be set to 'http://localhost' by default.

Users will see a fatal error pointing them to the on-wiki $wgServer
documentation that I've updated as well.

Originally this functionality was slated for removal in 1.20, but now is
just a good time as any. It also calls into other parts of MediaWiki before
most things are initialized, making it difficult to librarize some code.

Bug: T30798
Bug: T232931
Change-Id: Ia5d616e7fafbab01655067c24c5a3a073b254f21
(cherry picked from commit 03078991c4408b8e4e72cc28584a9d011d9edf72)

15 months agoMerge "Parser: Hard deprecate getConverterLanguage" into REL1_34
jenkins-bot [Wed, 30 Oct 2019 21:47:48 +0000 (21:47 +0000)]
Merge "Parser: Hard deprecate getConverterLanguage" into REL1_34

15 months agoDeprecate additional public methods of Parser
C. Scott Ananian [Tue, 29 Oct 2019 07:34:25 +0000 (03:34 -0400)]
Deprecate additional public methods of Parser

Affected:
Parser::armorLinks()
Parser::makeKnownLinkHolder()
Parser::getImageParams()
Parser::parseLinkParameter()
Parser::stripAltText()

It wasn't obvious there was a better name for these, so just rename
them with a `...Private` suffix and deprecate the old names.  When
the deprecated public methods are removed we'll rename the private
methods to remove the `...Private` suffix again.

Code search:
https://codesearch.wmflabs.org/deployed/?q=armorLinks%7CmakeKnownLinkHolder%7CgetImageParams%7CparseLinkParameter%7CstripAltText&i=nope&files=&repos=

Bug: T236810
Change-Id: I44458490fa86abd0ead048a4c94021da6be333f0
(cherry picked from commit 736b6b27f3dc1e9f7b4facc55f08dbc28da68827)

15 months agoDeprecate Parser::replaceLinkHolders / replaceLinkHoldersText
C. Scott Ananian [Tue, 29 Oct 2019 16:52:47 +0000 (12:52 -0400)]
Deprecate Parser::replaceLinkHolders / replaceLinkHoldersText

Because this method is used in the ImageMap extension, we can't
immediately hard-deprecate replaceLinkHolders.

Code search:
https://codesearch.wmflabs.org/deployed/?q=replaceLinkHolders&i=nope&files=&repos=

Bug: T236810
Change-Id: If02130ffc86d0d9db2a455efcd29641a8206f0a0
(cherry picked from commit 023bb7677fa93b97e155969bacc4ef8be2410b3c)

15 months agoDeprecate Parser::splitWhitespace() / Parser::createAssocArgs()
C. Scott Ananian [Tue, 29 Oct 2019 07:52:58 +0000 (03:52 -0400)]
Deprecate Parser::splitWhitespace() / Parser::createAssocArgs()

These methods are not used anywhere in deployed code.

Parser::createAssocArgs() is used in Extension:DataTable2, but it should
just copy the implementation from Parser, it's very little code.

Code search:
https://codesearch.wmflabs.org/deployed/?q=splitWhitespace%7CcreateAssocArgs&i=nope&files=&repos=

Bug: T236810
Change-Id: I4e6a39e2ecf7a3a568e26ad1d8ce1166a44a5ad9
(cherry picked from commit d7cd12e81ff6622bb5e14980297f926a3dec0984)

15 months agoDeprecate Parser::areSubpagesAllowed() / Parser::maybeDoSubpageLink()
C. Scott Ananian [Tue, 29 Oct 2019 07:32:44 +0000 (03:32 -0400)]
Deprecate Parser::areSubpagesAllowed() / Parser::maybeDoSubpageLink()

These are unused outside the Parser and are so short it's not worth
renaming them to make them private; just hard-deprecate the methods
and inline the implementation in the small # of places they appear.

Code search:
https://codesearch.wmflabs.org/deployed/?q=areSubpagesAllowed%7CmaybeDoSubpageLink&i=nope&files=&repos=

Bug: T236810
Change-Id: Ia06c65409a3158b083bcc59c9f6e347945b375c0
(cherry picked from commit dcae22c8fa46822148dc5fd87018acb385bf4c91)

15 months agoDeprecate Parser implementation methods (will be private in next release)
C. Scott Ananian [Mon, 28 Oct 2019 19:52:50 +0000 (15:52 -0400)]
Deprecate Parser implementation methods (will be private in next release)

The following public methods were renamed and made private; the old name
is hard-deprecated and calls the new renamed private method:

Parser::doMagicLinks() => handleMagicLinks()
Parser::doDoubleUnderscore() => handleMagicLinks()
Parser::doHeadings() => handleHeadings()
Parser::doAllQuotes() => handleAllQuotes()
Parser::replaceExternalLinks() => handleExternalLinks()
Parser::replaceInternalLinks() => handleInternalLinks()
Parser::replaceInternalLinks2() => handleInternalLinks2()
Parser::getVariableValue() => expandMagicVariable()
Parser::initialiseVariables() => initializeVariables()
Parser::formatHeadings() => finalizeHeadings()
Parser::test{Pst,Preprocess,Srvus}() => fuzzTest{Pst,Preprocess,Srvus}()

Additionally, the following methods are not used externally, but are
used outside the Parser class by core code.  They have been marked
@internal:

Parser::doQuotes() (used by {{#displaytitle}}),
Parser::getExternalLink{Rel,Attribs}() (used by Linker),
Parser::normalizeLinkUrl() (used by Special:LinkSearch and elsewhere).
Parser::{brace,arg,extension}Substitution() (used by PPFrame)

Code search query:
https://codesearch.wmflabs.org/deployed/?q=do%28MagicLinks%7CDoubleUnderscore%7CHeadings%7CAllQuotes%29%7Creplace%28ExternalLinks%7CInternalLinks%28%7C2%29%29%7CgetVariableValue%7CinitialiseVariables%7CformatHeadings%7Ctest%28Pst%7CPreprocess%7CSrvus%29%7CdoQuotes%7CgetExternalLink%28Rel%7CAttribs%29%7CnormalizeLinkUrl%7C%28brace%2Carg%2Cextension%29Substitution&i=nope&files=&repos=

Bug: T236810
Change-Id: I19a43ffc5dcfdd2981b51079c33422c964acb076

16 months agoParser: Hard deprecate getConverterLanguage
Fomafix [Mon, 30 Sep 2019 19:34:03 +0000 (21:34 +0200)]
Parser: Hard deprecate getConverterLanguage

getConverterLanguage is deprecated since MediaWiki 1.32.
getConverterLanguage always return a Language object and never null.

Change-Id: Ia0480c76416ef1e925619d9e85c7134c2ecf2296
Depends-On: Iea4771161d129c49f6482e1a6822e1324bf2fb49
(cherry picked from commit 9bae9db4cc296f248ea7c1fba950032e54a5cb03)

16 months agoAdd release notes for discontinuation of IE6/7 support
Timo Tijhof [Fri, 25 Oct 2019 22:29:49 +0000 (23:29 +0100)]
Add release notes for discontinuation of IE6/7 support

Bug: T232563
Change-Id: I95c693d7c3059f441489d61f3fce597f02bedc0e

16 months agoUpdate git submodules
Reedy [Wed, 23 Oct 2019 14:45:50 +0000 (15:45 +0100)]
Update git submodules

* Update extensions/OATHAuth from branch 'REL1_34'
  to eacb5b281ae3fac18f394342a419d63ad6064d9c
  - Bump 0.4.4

    Change-Id: I3097526954c18c6759461f800168ebeb4a92e9e7

16 months agoUpdate git submodules
Dejan Savuljesku [Wed, 23 Oct 2019 07:49:37 +0000 (09:49 +0200)]
Update git submodules

* Update extensions/OATHAuth from branch 'REL1_34'
  to 99b1f06a2f411c08f12e3fa80257ac0a49612345
  - Ask for user re-auth only on initial requests

    Make sure user is asked to re-authenticate (if needed) only on initital request,
    not after submitting the form

    Bug: T235645
    Change-Id: Ic315f49ac5810da0a703ccf4b51f558d17f905fb

16 months agoMerge "resources: Collapse all jQuery UI modules into one deprecated mega-module...
jenkins-bot [Sun, 20 Oct 2019 09:51:58 +0000 (09:51 +0000)]
Merge "resources: Collapse all jQuery UI modules into one deprecated mega-module" into REL1_34

16 months agoFix docs for GetUserBlock hooks
Daimona Eaytoy [Sun, 20 Oct 2019 08:45:27 +0000 (10:45 +0200)]
Fix docs for GetUserBlock hooks

Change-Id: I93b64fb00477c0632a6fa3573800dd7609d25db0

16 months agoresources: Collapse all jQuery UI modules into one deprecated mega-module
James D. Forrester [Thu, 10 Oct 2019 23:33:54 +0000 (16:33 -0700)]
resources: Collapse all jQuery UI modules into one deprecated mega-module

(cherry picked from commits b76856675d78d1 and ecf4cb6610).

Bug: T219604
Change-Id: I9070ad9052319f5ca2bc67e0ffaf502db0f13ceb

16 months agoDeprecate 'jquery.tabIndex' module
Ammar Abdulhamid [Sun, 13 Oct 2019 10:25:20 +0000 (11:25 +0100)]
Deprecate 'jquery.tabIndex' module

Bug: T234581
Change-Id: I8e1b43ae17b2bdd90f5ce7f0a4907cf94f759b8d

16 months agoUpdate RELEASE-NOTES-1.34 for various backports
Reedy [Fri, 18 Oct 2019 21:26:20 +0000 (22:26 +0100)]
Update RELEASE-NOTES-1.34 for various backports

Change-Id: I6241e2a0820fc2f89c806d202514ae75039e1fa0

16 months agoDeprecate setting Parser::mTitle to null
C. Scott Ananian [Thu, 17 Oct 2019 16:59:04 +0000 (12:59 -0400)]
Deprecate setting Parser::mTitle to null

This never happens in core code; however extensions have slipped into
a state of sin.

Bug: T235392
Change-Id: Ia254949cd8b3bc162b11dcc911dcce40d91bf1b7
(cherry picked from commit dd9e6124b4a47b98cccdaa2971d587ecc6f0ab6e)

16 months agoRevert "Parser: Add Title type hints"
Fomafix [Mon, 14 Oct 2019 18:52:19 +0000 (20:52 +0200)]
Revert "Parser: Add Title type hints"

This change reverts most of commit 3dff713fe4.

Especially the return type hints for getTitle() and Title() are reduced
to allow the type null as return value, because SematicMediaWiki uses
this by

$this->parser->getTitle() instanceof Title

to check if there is a valid Title object.

The parameter type hints for setTitle() and Title() are kept.

Bug: T235392
Change-Id: I72ac1c9d37059876dbc7cd38158e7abd212da8fe
(cherry picked from commit d91a136ae7b53f07bac62aba944f5a7ba1ccd7ec)

16 months agobuild: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
James D. Forrester [Fri, 11 Oct 2019 16:30:40 +0000 (09:30 -0700)]
build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0

Newly-disabled general rules:
* MediaWiki.Commenting.FunctionComment.MissingSplatVariadicArg
* MediaWiki.Commenting.FunctionComment.SuperfluousVariadicArgComment
* MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedException
* MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedExceptionMessage
* MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedExceptionMessageRegExp
* MediaWiki.Usage.NullableType.PHP71NullableStyle
* MediaWiki.Usage.PHPUnitTypeHints.MissingTypehint
* PSR12.Files.ImportStatement.LeadingSlash
* PSR12.Properties.ConstantVisibility.NotFound

Change-Id: Ifcf8c6d5fecc47a32741114b5a5b746a41510045

16 months agoBaseTemplate: Use explicit varargs in method parameters
Máté Szabó [Sat, 5 Oct 2019 16:27:30 +0000 (18:27 +0200)]
BaseTemplate: Use explicit varargs in method parameters

With the removal of HHVM support, we can now use explicit varargs
in function arguments. This patch updates the BaseTemplateclass to
do so, and also removes PhanCommentParamWithoutRealParam check suppressions,
which are now redundant.

Bug: T231710
Change-Id: If78bd1556c862a472afe3646fd362b3c6baefbe0

16 months agoUse splat operator in signature, not func_get_args
Michael Große [Mon, 11 Mar 2019 18:10:54 +0000 (19:10 +0100)]
Use splat operator in signature, not func_get_args

Most of the original scope of this patch was implemented in 8665536045c

What remains is to use the splat operator in the method signature as
well which is more readable than using func_get_args and doesn't annoy
phan. This is now possible, because we are no longer testing on HHVM and
these mocking in HHVM tests was the only place where this was broken.

Change-Id: I52912d1810b955b05cd17fab424f80c201883411

16 months agoPPFrame: Use explicit varargs in method parameters
Máté Szabó [Sat, 5 Oct 2019 15:52:29 +0000 (17:52 +0200)]
PPFrame: Use explicit varargs in method parameters

With the removal of HHVM support, we can now use explicit varargs
in function arguments. This patch updates the PPFrame interface to
do so, and also removes PhanCommentParamWithoutRealParam check suppressions,
which are now redundant.

It seems that classes implementing this interface were already using varargs.

Bug: T231710
Change-Id: Ib1d69575835df80dca4e43b0028ad9368f62bb58

16 months agoUse real variargs for variadic methods
Daimona Eaytoy [Tue, 3 Sep 2019 16:01:04 +0000 (18:01 +0200)]
Use real variargs for variadic methods

These were all checked via codesearch to ensure that nothing is overriding
these methods.

Change-Id: Ie2d8c1fd01478f46f3d0d1259417182b0d955a12

16 months agoUse varargs for MessageLocalizer::msg and similar
Umherirrender [Fri, 8 Jun 2018 20:35:15 +0000 (22:35 +0200)]
Use varargs for MessageLocalizer::msg and similar

Bug: T191666
Change-Id: I59f2ae1a96af392026fc106e57d23553003c16b8
(cherry picked from commit 8752df6592436d3394a743331bf8ac8299fe0f7d)

16 months agosession: Add debug message for the used store class
Timo Tijhof [Wed, 16 Oct 2019 22:41:01 +0000 (23:41 +0100)]
session: Add debug message for the used store class

Follows-up 70cb2664805.

Bug: T234361
Change-Id: Ifd6616b1a31f6cb915ec553865e999fcd974784e
(cherry picked from commit f2e6fab93ff0d45c95498146b022c761c5bbcd14)

16 months agoUpdate git submodules
Reedy [Thu, 17 Oct 2019 23:58:59 +0000 (00:58 +0100)]
Update git submodules

* Update extensions/SyntaxHighlight_GeSHi from branch 'REL1_34'
  to d45d04f053c79deba29311aee1070b1ac1de79de
  - Update README to match pygments version

    Bug: T235808
    Change-Id: Iea9a1bc566f67507414f7f2a4fdfd89c8433b7fd
    Follows-Up: I4dc1782f19881ba1294308e1cdea1b2e063f438a
    (cherry picked from commit e286f3be4fada723e8a4cd32db2e56d32397f8d3)

16 months agoDon't apply styling for Special:Contributions on other pages
Bartosz Dziewoński [Wed, 16 Oct 2019 20:26:37 +0000 (22:26 +0200)]
Don't apply styling for Special:Contributions on other pages

This file is part of a large ResourceLoader module that is loaded on
many special pages.

The change here uses the same approach as other files in this
directory, e.g. block.less.

Bug: T235137
Change-Id: I23c552944c6e7e31a4107f7974bb1e5867627283
(cherry picked from commit ffaae18c76f5b6674f8aa565ee9e7579f9aac3e1)

16 months agoFix example Kask configuration in RESTBagOStuff class comment
Nikki Nikkhoui [Tue, 15 Oct 2019 21:07:41 +0000 (14:07 -0700)]
Fix example Kask configuration in RESTBagOStuff class comment

Fix error in RESTBagOStuff class comment, so that the example Kask
configuration is properly documented

Bug: T235559

Change-Id: If664913a4e61013dba070153b10def5ecd6caeb3
(cherry picked from commit 3cda7b78466e294de0a9434178254a5c70ac8d0a)

16 months agoUpdate git submodules
Dejan Savuljesku [Fri, 20 Sep 2019 07:27:55 +0000 (09:27 +0200)]
Update git submodules

* Update extensions/OATHAuth from branch 'REL1_34'
  to d0e306118dcc6c3fbda00f4cdb25c2628c364acd
  - Do not store proper objects in session data

    Bug: T233146
    Change-Id: I2f75261b276993d27f6c96e066ea7769cf7fc082
    (cherry picked from commit 920136e67b1b78fac4317aa91f20c97184ad67b6)

16 months agolocalisation: Log debug message for backend of MessageCache
Timo Tijhof [Fri, 11 Oct 2019 23:26:18 +0000 (00:26 +0100)]
localisation: Log debug message for backend of MessageCache

Bug: T234361
Change-Id: I697626a83cca4c6893cc30ca6ae118f10195624c
(cherry picked from commit 8e9adb9486257867385128bd8eedd6e8d6d7035e)

16 months agoprofiler: Deprecate ProfilerOutputDb and profileinfo.php
Timo Tijhof [Fri, 11 Oct 2019 22:55:34 +0000 (23:55 +0100)]
profiler: Deprecate ProfilerOutputDb and profileinfo.php

Bug: T231366
Change-Id: I962a794c6806aa014af4b904e8b974fb0f4384b0
(cherry picked from commit 7b87584d87d69d1de2209b13c767a08475b47f6e)

16 months agoSetup RELEASE-NOTES for commits after 1.34.0-rc.0
Reedy [Tue, 15 Oct 2019 19:10:14 +0000 (20:10 +0100)]
Setup RELEASE-NOTES for commits after 1.34.0-rc.0

Change-Id: I7d47e073a0095ff0cb7d0860bf750de8f4a6c8d9

16 months agordbms: Restore debug toolbar "Queries" feature
Timo Tijhof [Sat, 5 Oct 2019 01:56:12 +0000 (02:56 +0100)]
rdbms: Restore debug toolbar "Queries" feature

This broke after e0cc49ce3971e19, due to the field 'master'
being removed from the log context. The LegacyLogger logic
forwarding these messages to MWDebug (for the debug toolbar)
however, was dependant on.

Users of debug toolbar experienced a silent failure because the
logic in question is very tolerant of missing fields. This is
because it uses those fields to distinguish the 'sql' messages
from channel=DBQuery from other messages in the same channel.
Making that less fragile is outside the scope of this commit.

This commit:

* Restore the basic functionality by making sure MWDebug::query()
  gets called again for DBQuery messages.

* Remove the code relating to the 'master' field as this no longer
  exists in RDBMS. It also wasn't used anywhere (to be used,
  it would need to be read by mediawiki.debug/debug.js).

* Remove unexpanded "{method}" and "{runtime}" noise in the debug
  toolbar text. This was introduced by he conversion to PSR-3
  logging.. These fields are already rendered separately by
  the toolbar and should not be part of the "SQL" column.
  To do this, we need to log the $sql bit as its own key, so
  I've made this a context field as well.

* Reduce the condition logic in LegacyLogger to only looking for
  'DBQuery' and 'sql'. This way, if it breaks again it will
  still call the logic within and emit E_NOTICE instead, which
  would help detect the issue (and still fallback to at least
  showing the queries). Unlike before this commit where it took
  quite some time to figure out why it wasn't working.

* The above fixes still weren't enough to get queries to show
  up in the Debug toolbar for me. Turns out, this was because
  my local setup (mediawiki-docker-dev) uses a master-replica
  set up. The setup doesn't use any custom LBFactory config,
  just plain $wgDBservers. The logic for turning these plain
  settings into LBFactory (in MWLBFactory.php) does kick in,
  and does run (unlike if I had custom wgLBFactoryConf).
  But, the DBO_DEBUG flag didn't make it through because of
  the += operator preferring any pre-existing value my setup
  has, which is just `DBO_DEFAULT`.
  Merging 'flags' keys seems unsafe in general, but adding
  DBO_DEBUG based on $wgDebugDumpSql seems innocent and doesn't
  affect other behaviour (it's a case of DWIM).

Bug: T231742
Change-Id: I122bb1a65620a7ae4e1943136c975b63524a5111
(cherry picked from commit 2e404a25828c713c0926b8f9e2003ad1e7dbe667)

16 months agoTweaks to RELEASE-NOTES needed before tagging 1.34.0-rc.0 1.34.0-rc.0
Reedy [Tue, 15 Oct 2019 17:44:11 +0000 (18:44 +0100)]
Tweaks to RELEASE-NOTES needed before tagging 1.34.0-rc.0

Change-Id: I9e2c41fbef7e13b266b122fcce0421077d18ca23

16 months agoUpdate CREDITS ahead of 1.34.0 release via updateCredits
Ammar Abdulhamid [Sun, 13 Oct 2019 01:39:59 +0000 (02:39 +0100)]
Update CREDITS ahead of 1.34.0 release via updateCredits

Some manual .mailman fixes.

Change-Id: I205731551850dd50547d87a7fd16ea688719e343
(cherry picked from commit e6e9265eadd2021afcc2a867bb81bbcf1253e535)

16 months agoRun executeGenderCacheFromResultWrapper with titles in prop=linkshere
Umherirrender [Sat, 12 Oct 2019 08:40:22 +0000 (10:40 +0200)]
Run executeGenderCacheFromResultWrapper with titles in prop=linkshere

The gender information are only needed when outputting titles,
in other cases (when only pageids are selected) it results in a
undefined property

Bug: T235316
Follow-Up: I911dcb160a7b169091b9e8f66fb3908d0f2a1ba4
Change-Id: I5c9a501919914afd38343551c755126c98d457e6

16 months agocomposer.json: Recommend OpenSSL
Max Semenik [Mon, 7 Oct 2019 23:47:34 +0000 (16:47 -0700)]
composer.json: Recommend OpenSSL

MW wouldn't even log users in without OpenSSL in default
configuration. Makes sense to mention it.

Change-Id: Ifa68adc09c23eed078d6c5624139da7df208fe99
(cherry picked from commit 308f3f6851dcec2334973553d5181a1f99a6e947)

16 months agoSession: Remove mcrypt support, dropped from PHP 7.2
Max Semenik [Mon, 7 Oct 2019 23:15:15 +0000 (16:15 -0700)]
Session: Remove mcrypt support, dropped from PHP 7.2

Change-Id: I46d04f4b31730ee1b368f2c2646638fa59234f66
(cherry picked from commit 2816b4f7daa872725887df41dde4641b41d5e234)

16 months agoobjectcache: Log debug message for backend of MainObjectStash
Timo Tijhof [Thu, 10 Oct 2019 20:30:47 +0000 (21:30 +0100)]
objectcache: Log debug message for backend of MainObjectStash

Bug: T234361
Change-Id: I8e33591dc92198269f45a25d14014af633a351f2
(cherry picked from commit bd16c5eb34e9a5dd67581cd4320e36653ddf5a0a)

16 months agoUpdate git submodules
Reedy [Fri, 11 Oct 2019 00:13:31 +0000 (01:13 +0100)]
Update git submodules

* Update vendor from branch 'REL1_34'
  to 4e1e1ae5f6f484aaa2713f7c9d60bd2887964fbf
  - Bump required PHP >= 7.2.9 to match core

    Change-Id: Ib0ec551c99530f5481b8c9b885b05743816253e8

16 months agoFollow-up Ifa346c8a92: LanguageNameUtils: CONSTRUCTOR_OTPIONS, not constructorOptions
James D. Forrester [Thu, 10 Oct 2019 23:56:18 +0000 (16:56 -0700)]
Follow-up Ifa346c8a92: LanguageNameUtils: CONSTRUCTOR_OTPIONS, not constructorOptions

Change-Id: I357dddf39834e9eed4b173245033d2f27edab329
(cherry picked from commit b83a3e3e3afaba41545abf1211e85558e81a3f9a)

16 months agoMerge "NameTableStore: ensure consistency upon rollback." into REL1_34
jenkins-bot [Thu, 10 Oct 2019 22:21:24 +0000 (22:21 +0000)]
Merge "NameTableStore: ensure consistency upon rollback." into REL1_34

16 months agoNameTableStore: ensure consistency upon rollback.
daniel [Tue, 4 Jun 2019 10:14:43 +0000 (12:14 +0200)]
NameTableStore: ensure consistency upon rollback.

This ensures consistent behavior when an ID for a name is first acquired
within a transaction that is rolled back. The documentation for acquireId
now reads:

@note If called within a transaction, there is a chance for the acquired ID to be lost
if the transaction is rolled back. A best effort is made to re-insert the mapping
after a rollback, and consistency of the cache with the database table is ensured
by re-loading the map after a failed transaction. However, there is no guarantee
that an ID returned by this method is valid outside the transaction in which it
was produced. This means that calling code should not retain the return value beyond
the scope of a transaction, but rather call acquireId() again after the transaction
is complete. In some rare cases, this may produce an ID different from the first call.

Bug: T224949
Change-Id: I6d05e4112a649675bfb9083cab2d1bbe394e65b3
(cherry picked from commit 135673b98eccc43528ce0dcc0ef61ed44b932471)

16 months agoobjectcache: Deprecate ObjectCache::getWANInstance
Timo Tijhof [Tue, 8 Oct 2019 21:17:22 +0000 (22:17 +0100)]
objectcache: Deprecate ObjectCache::getWANInstance

This is not used anywhere. Once removed we can remove a bunch
more protected/private methods in this class that are all only
here still due to this one public method.

It was obsolete when the creation of WANObjectCache was
moved to ServiceWiring. In theory multiple instances can be
created but in the future that should be done by either constructing
the WANObjectCache directly where needed, or by implementing
it as a custom service.

Also deprecate ObjectCache::newWANCacheFromParams. This should
have been `@internal`, but oh well. Deprecate as well since
only needed by getWANInstance(). No longer used internally
either as of I118b6f01e4940.

Change-Id: Icc500e76c860c35ff40fdee47142c63091829dfe
(cherry picked from commit b10b56dc6923062314f136945da255a24e52a585)

16 months agoSet minimum PHP version to 7.2.9
Reedy [Thu, 10 Oct 2019 20:25:58 +0000 (21:25 +0100)]
Set minimum PHP version to 7.2.9

Bug: T234766
Change-Id: I25206df6d7bc1587c3e18b1015603b3d264017f7

16 months agoMerge "composer: Correct PHP version requirement from 7.0 to 7.2 once CI lets us...
jenkins-bot [Thu, 10 Oct 2019 19:31:42 +0000 (19:31 +0000)]
Merge "composer: Correct PHP version requirement from 7.0 to 7.2 once CI lets us" into REL1_34

16 months agocomposer: Correct PHP version requirement from 7.0 to 7.2 once CI lets us
James D. Forrester [Wed, 2 Oct 2019 21:41:13 +0000 (14:41 -0700)]
composer: Correct PHP version requirement from 7.0 to 7.2 once CI lets us

Bug: T234767
Change-Id: I96ddb373bb89a8c7e3b0599bb7c7dc671e26e337
(cherry picked from commit 54cd4fcabad81f57049f959bde4774e3707cd7d0)

16 months agoobjectcache: Log debug message for backend of WANObjectCache
Timo Tijhof [Tue, 8 Oct 2019 21:34:17 +0000 (22:34 +0100)]
objectcache: Log debug message for backend of WANObjectCache

While at it, disuse the static newWANCacheFromParams function
which was only used by ServiceWiring (can now be deprecated,
but done separate for easier backporting).

Now that it is inlined, there is easy access to its logger.

Bug: T234361
Change-Id: I118b6f01e49405984310030d44ee319bb25bfcdb
(cherry picked from commit 3828558140eba4427d762937a2ea5ae352485d5f)

16 months agoUpdate git submodules
jenkins-bot [Wed, 9 Oct 2019 21:13:37 +0000 (21:13 +0000)]
Update git submodules

* Update extensions/OATHAuth from branch 'REL1_34'
  to 9b33403ce11c32eac998f58e28717676091947e6
  - Merge "Bump 0.4.3" into REL1_34
  - Bump 0.4.3

    Change-Id: Id6ea1e2e41d64ccdfb02b6b081595c0a2b490329

16 months agoUpdate git submodules
Dejan Savuljesku [Wed, 11 Sep 2019 08:29:43 +0000 (10:29 +0200)]
Update git submodules

* Update extensions/OATHAuth from branch 'REL1_34'
  to 8ba29f4a5c469245807ecba39504c9e9d5cc0570
  - Ask user to reauthenticate before changing 2FA method

    Re-auth period set to 60s

    Bug: T218211
    Change-Id: I17a84b8e60da2ada35c6b86cf6b66d75fb3f13fe

16 months agoMerge "Split some Language methods to LanguageNameUtils" into REL1_34
jenkins-bot [Wed, 9 Oct 2019 09:46:53 +0000 (09:46 +0000)]
Merge "Split some Language methods to LanguageNameUtils" into REL1_34

16 months agoServices: Convert MWLBFactory's static to a const now HHVM is gone
James D. Forrester [Tue, 8 Oct 2019 18:33:31 +0000 (11:33 -0700)]
Services: Convert MWLBFactory's static to a const now HHVM is gone

Change-Id: I2b5c77c304e03af31bc3f15f2e3f6002ca2f2647
(cherry picked from commit 6898ba72325b2227d33d002d337474bd23e0bffb)

16 months agoSplit some Language methods to LanguageNameUtils
Aryeh Gregor [Thu, 2 May 2019 14:23:42 +0000 (17:23 +0300)]
Split some Language methods to LanguageNameUtils

These are static methods that have to do with processing language names
and codes. I didn't include fallback behavior, because that would mean a
circular dependency with LocalisationCache.

In the new class, I renamed AS_AUTONYMS to AUTONYMS, and added a class
constant DEFINED for 'mw' to match the existing SUPPORTED and ALL. I
also renamed fetchLanguageName(s) to getLanguageName(s).

There is 100% test coverage for the code in the new class.

This was previously committed as 2e52f48c2ed and reverted because it
depended on e4468a1d6b6, which had to be reverted for performance
issues. There should be no changes other than rebasing.

Bug: T201405
Change-Id: Ifa346c8a92bf1eb57dc5e79458b32b7b26f1ee8a
(cherry picked from commit 6d80b6c0827401cf8e41589bf134147bb0aa407f)

16 months agoHHVM removal: Deprecate and simplify wfIsHHVM()
James D. Forrester [Thu, 3 Oct 2019 18:03:46 +0000 (11:03 -0700)]
HHVM removal: Deprecate and simplify wfIsHHVM()

Change-Id: I81b15d3ae66f070a8a1286627973a339cc08e86b
(cherry picked from commit c00e7cd793c72875ed0cadd89aa48b033cca2571)

16 months agoAdd optional serialization_type and hmac_key param values to RESTBagOStuff
Bill Pirkle [Thu, 26 Sep 2019 17:59:15 +0000 (12:59 -0500)]
Add optional serialization_type and hmac_key param values to RESTBagOStuff

T233537 made RESTBagOStuff work with the Kask external session
storage service, but broke backward compatibility. Add optional
values to the RESTBagOStuff $params constructor parameter to
support communicating with Kask, and to allow using HMAC. The
new values are:
  serialization_type: legacy (default), PHP, or JSON
  hmac_key: HMAC key to use for protecting the serialized blob
If these new values are not specified, behavior remains
unchanged (PHP serialization with no HMAC protection).

Bug: T233963
Change-Id: Ia2625c04e08cfe9616569500f1d613be73c170a2
(cherry picked from commit 2ed69af15cb8971e35aafc2c08397ed38c480488)

16 months agoMerge "Disable flaky Selenium test" into REL1_34
jenkins-bot [Tue, 8 Oct 2019 21:11:31 +0000 (21:11 +0000)]
Merge "Disable flaky Selenium test" into REL1_34

16 months agoMerge "Services: Convert LocalisationCache's static to a const now HHVM is gone"...
jenkins-bot [Tue, 8 Oct 2019 21:10:44 +0000 (21:10 +0000)]
Merge "Services: Convert LocalisationCache's static to a const now HHVM is gone" into REL1_34

16 months agoMerge "Make LocalisationCache a service" into REL1_34
jenkins-bot [Tue, 8 Oct 2019 21:08:21 +0000 (21:08 +0000)]
Merge "Make LocalisationCache a service" into REL1_34

16 months agoMerge "Services: Convert DefaultPreferencesFactory's static to a const now HHVM is...
jenkins-bot [Tue, 8 Oct 2019 21:03:04 +0000 (21:03 +0000)]
Merge "Services: Convert DefaultPreferencesFactory's static to a const now HHVM is gone" into REL1_34

16 months agoDisable flaky Selenium test
Reedy [Tue, 8 Oct 2019 20:20:30 +0000 (21:20 +0100)]
Disable flaky Selenium test

Bug: T226144
Change-Id: Ib49898617ba419f709b249ae9a05d9cb7b8e4e9d

16 months agoServices: Convert DefaultPreferencesFactory's static to a const now HHVM is gone
James D. Forrester [Tue, 8 Oct 2019 18:28:15 +0000 (11:28 -0700)]
Services: Convert DefaultPreferencesFactory's static to a const now HHVM is gone

Change-Id: If24c5f120cb96311b50750c5b3022664dc6b20e5
(cherry picked from commit 17f3f9cee31cd3aab4370808871309d9de5a87f9)

16 months agoServices: Convert LocalisationCache's static to a const now HHVM is gone
James D. Forrester [Tue, 8 Oct 2019 18:25:30 +0000 (11:25 -0700)]
Services: Convert LocalisationCache's static to a const now HHVM is gone

Change-Id: If5c015debed7efc034613b976bc5292ac30036d7
(cherry picked from commit ebac0247cf38b45a253042be16998c7fffbffcbc)

16 months agoMake LocalisationCache a service
Aryeh Gregor [Wed, 1 May 2019 13:56:41 +0000 (16:56 +0300)]
Make LocalisationCache a service

This removes Language::$dataCache without deprecation, because 1) I
don't know of a way to properly simulate it in the new paradigm, and 2)
I found no direct access to the member outside of the Language and
LanguageTest classes.

An earlier version of this patch (e4468a1d6b6) had to be reverted
because of a massive slowdown on test runs. Based on some local testing,
this should fix the problem. Running all tests in languages is slowed
down by only around 20% instead of a factor of five, and memory usage is
actually reduced greatly (~350 MB -> ~200 MB). The slowdown is still not
great, but I assume it's par for the course for converting things to
services and is acceptable. If not, I can try to optimize further.

Bug: T231220
Bug: T231198
Bug: T231200
Bug: T201405
Change-Id: Ieadbd820379a006d8ad2d2e4a1e96241e172ec5a
(cherry picked from commit 043d88f680cf66c90e2bdf423187ff8b994b1d02)

16 months agoServices: Convert PasswordReset's static to a const now HHVM is gone
James D. Forrester [Tue, 8 Oct 2019 18:26:17 +0000 (11:26 -0700)]
Services: Convert PasswordReset's static to a const now HHVM is gone

Change-Id: I77e0d9ce86cf96824eb672d0f35c32b5f4c484be
(cherry picked from commit 662b27776b0df77f31e9767bfbecd8bf0ca6ef93)

16 months agoServices: Convert BlobStoreFactory's static to a const now HHVM is gone
James D. Forrester [Tue, 8 Oct 2019 18:27:22 +0000 (11:27 -0700)]
Services: Convert BlobStoreFactory's static to a const now HHVM is gone

Change-Id: Ia319c881f0457fde71e355eca4873ac157e605d3
(cherry picked from commit 4afe9030c2ff36811e5ff8260e9c401b6e047c01)

16 months agoOptionally require both username and email for password resets
Max Semenik [Sat, 14 Sep 2019 07:58:42 +0000 (00:58 -0700)]
Optionally require both username and email for password resets

Bug: T232694
Change-Id: I70ed25ea4f810bf642fcb3df6f9b2663732b5dcf
(cherry picked from commit 1de3611539dbef2df2b9c0a4632aecd066695990)