Commit graph

114030 commits

Author SHA1 Message Date
jenkins-bot
454b8302a8 Merge "rdbms: add CONN_UNTRACKED_GAUGE LoadBalancer flag for LoadMonitor gauging" 2023-01-08 22:43:44 +00:00
Robin van der Vliet
4d66448701 Add Toki Pona (tok) to Names.php
Readd the language Toki Pona (tok) to Names.php, this time with a
ISO 639-3 code.

Bug: T300378
Bug: T236938
Change-Id: I5c8a7079d05b8d3d4104ae4c908aff55acf4c20f
2023-01-08 16:02:23 +00:00
Reedy
23acb9421b ForeignResourceManager: Add import for SplFileInfo
Change-Id: I07b9ada2c15367d6a756fb677d43dc149be999cc
2023-01-08 03:45:50 +00:00
jenkins-bot
9119110010 Merge "Normalize consecutive spaces when building the sort values" 2023-01-07 21:18:55 +00:00
jenkins-bot
a8a8346398 Merge "Replace <br> with space rather than empty string when building the sort key" 2023-01-07 21:13:26 +00:00
jenkins-bot
36be4ed8f5 Merge "docs: Move together Rdbms-related lines in RELEASE-NOTES-1.40" 2023-01-07 19:15:15 +00:00
jenkins-bot
0d93947b20 Merge "parser: Improvements to Preprocessor::buildDomTreeArrayFromText" 2023-01-07 17:55:18 +00:00
Hank Hulet
61864eacfa Normalize consecutive spaces when building the sort values
Bug: T326474
Change-Id: I013a05a4a4a2fc16f74d1c858f6706e986d96a4e
2023-01-07 16:57:02 +00:00
Hank Hulet
054dcaa29c Replace <br> with space rather than empty string when building the sort key
Bug: T326081
Change-Id: I49d2ec44b5d143d573fec889ec0f2872251287b7
2023-01-07 16:37:37 +00:00
jenkins-bot
d3ecbc93a3 Merge "parser: Optimize regex patterns used in LinkHolderArray" 2023-01-07 16:21:50 +00:00
thiemowmde
69c5757243 parser: Optimize regex patterns used in LinkHolderArray
Two micro-optimizations are done in this patch:

1. We know exactly how these placeholders are built in the makeHolder()
method. In »<!--IWLINK'" 1-->« it's guaranteed to be a single number
and in »<!--LINK'" 1:2-->« it's two numbers.

The most extreme synthetic micro benchmark I did cuts the runtime of
these regular expressions down to about 25%. It won't make much of a
difference in real-world scenarios but is still worth it, I believe.

It also makes the code more specific and less confusing (see below).

2. We don't need to use the full string »<!--LINK'" 1:2-->« as array
key when the only thing that matters is the part »1:2«. Note the same
is done just a few lines below in the replaceInterwiki() method.

This code does have outstanding test coverage via all the parser tests,
I believe. Any change here that doesn't make a test fail should be safe.

Note the unit tests have been written many years later via I2c12cc7,
using "dummy" strings and such instead of the expected numeric
namespace and link ids. Most of this is already fixed via previous
patches. The last mistake addressed in this patch is that
getPrefixedDBkey() is supposed to be a title. It can't contain one of
these placeholders.

Follow-Up: I2c12cc76a9bf01eb527db3ea038e4adc59446cac
Change-Id: Ie994059092df8861ddb97c098acd082698d45c53
2023-01-07 13:25:33 +00:00
jenkins-bot
73613cfb3e Merge "Make permalink available in raw form" 2023-01-07 10:38:47 +00:00
jenkins-bot
860479d880 Merge "ChangeTags: Move space inside .mw-tag-other-edits" 2023-01-07 04:03:37 +00:00
AntiCompositeNumber
3237dabf25
ChangeTags: Move space inside .mw-tag-other-edits
This allows the other edits link to be more easily hidden with
CSS.

Bug: T326376
Change-Id: I1830044341cc26c058fa19095c7d08dddb449cf4
2023-01-06 22:01:15 -05:00
jenkins-bot
bcfd9d1979 Merge "libs\jsminplus: Declare JSNode::$expression" 2023-01-07 01:32:23 +00:00
jenkins-bot
35822685b5 Merge "tests: Remove assertion of spec in ParamValidatorTest::testGetTypeDef" 2023-01-07 01:32:15 +00:00
jenkins-bot
9e11457388 Merge "stream wrapper: Declare $context class property" 2023-01-07 01:28:02 +00:00
jenkins-bot
822a3b7dd5 Merge "tests: Allow dynamic properties on PHP 8.2 for GhostFieldTestClass" 2023-01-07 01:04:39 +00:00
jenkins-bot
4ef95bfb4d Merge "tests: Declare GIFMetadataExtractorTest::$mediaPath" 2023-01-07 01:01:08 +00:00
jenkins-bot
903ca45257 Merge "rdbms: Remove setBigSelects() without deprecation" 2023-01-07 00:10:21 +00:00
Aaron Schulz
5c8acb3ce7 rdbms: add CONN_UNTRACKED_GAUGE LoadBalancer flag for LoadMonitor gauging
When gauging the state of servers during LoadMonitor cache regeneration,
use these flags to prevent expensive timeouts and stalls while trying to
pick a server to use for DB_REPLICA.

Note that https://bugs.php.net/bug.php?id=76703 prevents the changing of
read timeouts after connection.

Removed some outdated Database::getConnection() comments.

Bug: T265386
Change-Id: I20ff8f761290dcb69d7971a91091bb950c0afe38
2023-01-06 15:31:37 -08:00
Umherirrender
4dcdb06a70 UserOptionsManager: Avoid DB delete queries for unchanged default values
When calling UserOptionsManager to "change" an option to a value
equal to the default, when that option wasn't overriden (inherits the
default), it still sent a delete query to the database when we knew
the row doesn't exist.

Bug: T301506
Change-Id: I9bd1f188a977d966b40c1320c105dbc9bfd0eb3c
2023-01-06 22:54:20 +00:00
Timo Tijhof
0882edf2e5 docs: Move together Rdbms-related lines in RELEASE-NOTES-1.40
* Move `deadlockLoop()` entry that was wrongly in the Deprecations
  section to the Breaking changes section.
* Fix `getTransactionRoundStage()` entry which wrongly claimed to
  be in LBFactory but was in LoadBalancer.

Change-Id: I77830899909159d2604bcd494b5b863cacfe08f3
2023-01-06 22:25:20 +00:00
Aaron Schulz
7d4f6d372e rdbms: Remove setBigSelects() without deprecation
Bug: T325610
Change-Id: I43a5bde7ae54af7ab0c817df5eab8234a2c41564
2023-01-06 22:16:35 +00:00
Umherirrender
a602dd8139 parser: Improvements to Preprocessor::buildDomTreeArrayFromText
- Use a non-capturing group and positive look-ahead assertion, use the
overall capture as result
- Use substr_compare to compare strings
- Remove unneeded variable assigment
- Use array_pop to get the last element
- Remove unneeded isset/empty checks
- Change behaviour of $wsEnd to avoid +1 everywhere

Change-Id: Ifc1728b09743ec91908b59c09ac34598d9cd8b49
2023-01-06 22:43:33 +01:00
jenkins-bot
1e334b6b85 Merge "Sync up core repo with Parsoid" 2023-01-06 20:33:18 +00:00
jenkins-bot
2a0b16343c Merge "parser: Small improvements to Preprocessor::buildDomTreeArrayFromText" 2023-01-06 18:39:46 +00:00
jenkins-bot
3e233ba047 Merge "rcfilters: Tweak formatting of inverted filters" 2023-01-06 18:21:43 +00:00
Umherirrender
20c83e9852 parser: Small improvements to Preprocessor::buildDomTreeArrayFromText
- Use str_contains
- Always use strict comparision
- Remove unneeded parenthesis
- Break some lines
- Remove unneeded variable assigment
- Move variable closer to the usage
- Unpack $matches to named variables

Change-Id: I31b92afe32243748198dbb692144b4b575772554
2023-01-06 18:42:02 +01:00
jenkins-bot
925834518d Merge "Code style cleanup" 2023-01-06 17:20:09 +00:00
Subramanya Sastry
00c1883200 Sync up core repo with Parsoid
This now aligns with Parsoid commit f4a186b9b63f9216b2d7a363aa1ed45aef59b0c4

Change-Id: Ie48f0c03a1539a575389f766b994c54a75bfb3e1
2023-01-06 08:29:04 -06:00
jenkins-bot
c9edde0ce1 Merge "tests: Use MW_VERSION instead of deprecated $wgVersion" 2023-01-06 13:57:37 +00:00
jenkins-bot
bd963ac58b Merge "tests: Change assertion in AbstractSecondaryAuthenticationProviderTest" 2023-01-06 13:53:34 +00:00
jenkins-bot
fb34818cc8 Merge "Make phpunit:coverage-edit script independent of phpunit" 2023-01-06 11:51:05 +00:00
jenkins-bot
0f06391d61 Merge "Fix phan error when Excimer is enabled" 2023-01-06 10:22:53 +00:00
Translation updater bot
a2b31a9243 Localisation updates from https://translatewiki.net.
Change-Id: I831336cdef6b999550f02ec15d58472bff4fad21
2023-01-06 09:37:28 +00:00
jenkins-bot
2e9961076c Merge "build: Add phan stub for ReturnTypeWillChange" 2023-01-06 08:37:44 +00:00
Umherirrender
77792c225d tests: Change assertion in AbstractSecondaryAuthenticationProviderTest
Creation of dynamic property Mock_AuthenticationRequest_4d271de1::$done
is deprecated in php8.2

Bug: T314099
Change-Id: I21e7a257a5e695cc32f183add5ba6785a6898118
2023-01-06 04:06:32 +01:00
Umherirrender
8170da2516 tests: Remove assertion of spec in ParamValidatorTest::testGetTypeDef
Creation of dynamic property Mock_TypeDef_90a9d0fe::$spec is deprecated
in php8.2

Bug: T314099
Change-Id: If7b8a99cf7e7b94d9d2ff857948f874ccf3f1d37
2023-01-06 04:01:09 +01:00
Umherirrender
ea83138dcc tests: Declare GIFMetadataExtractorTest::$mediaPath
Creation of dynamic property GIFMetadataExtractorTest::$mediaPath is
deprecated in php8.2

Bug: T314099
Change-Id: I3247925a548586713d4363fc9e11625bc4c9ad46
2023-01-06 03:53:31 +01:00
Umherirrender
85ec890e7f stream wrapper: Declare $context class property
Creation of dynamic property UploadSourceAdapter::$context is deprecated
in php8.2

Prototyp says this property must exists
https://www.php.net/manual/en/class.streamwrapper.php

Bug: T314099
Change-Id: I8f8b42c2ea3351a3becdfac36248f6d371c32fe3
2023-01-06 03:39:22 +01:00
Umherirrender
c9346288e1 libs\jsminplus: Declare JSNode::$expression
Creation of dynamic property JSNode::$expression is deprecated in php8.2

Bug: T314099
Change-Id: Iecd790afd019a2ff9e339b2695b47be8f293520c
2023-01-06 03:14:06 +01:00
Umherirrender
b81db269a6 tests: Allow dynamic properties on PHP 8.2 for GhostFieldTestClass
Deprecated: Creation of dynamic property
Wikimedia\Reflection\GhostFieldTestClass::$privateField is deprecated in
/workspace/src/tests/phpunit/includes/libs/serialization/SerializationTestUtils.php
on line 150

Bug: T314099
Change-Id: Ic1cd7a3560e6fe39e6c7b077f42c90fbc844c202
2023-01-06 03:06:06 +01:00
jenkins-bot
5550f989a9 Merge "Galleries: Make gallery code more resilient to HTML transformations" 2023-01-06 01:31:47 +00:00
Jon Robson
8c98123a28 Galleries: Make gallery code more resilient to HTML transformations
The gallery code should be more resilient to HTML transformations
that can occur inside mobile app and MobileFrontend (or gadgets).

Data attributes are generally left untouched, so provide this
information as part of the output of the LI element so that the
gallery code can make use of it where possible.

This resolves the problem of lazy loaded images in the mobile site
meaning the hook added for MobileFrontend can also be removed.

Follow up to I58e18924c02fe12baba820f25b7a6f0c437a206b

Bug: T194887
Change-Id: I186bb0dbbea84d4dbb1d7b55278c69b2b46603de
2023-01-05 23:23:09 +00:00
jenkins-bot
2cff056b94 Merge "UploadBase.php: added namespace for w3c-test-suite" 2023-01-05 21:49:03 +00:00
jenkins-bot
8911353566 Merge "extension schema: Remove broken option to use null in OOUIThemePaths" 2023-01-05 21:45:11 +00:00
Derk-Jan Hartman
a5e0700da3 Code style cleanup
Some minor changes to silence the IDE

- Removed some unnecessary branching
- Use strict comparison where possible
- Use self::

Change-Id: Ica98f2d02520c9537f71dfd517a397828bf68848
2023-01-05 21:15:30 +00:00
jenkins-bot
74ce69ee9a Merge "profiler: Restore lost --profiler feature for Maintenance scripts" 2023-01-05 21:07:57 +00:00
jenkins-bot
df2baceeab Merge "specials: Special:Whatlinkshere should not act on special pages" 2023-01-05 20:36:28 +00:00