Commit graph

2918 commits

Author SHA1 Message Date
jenkins-bot 77b218bfdf Merge "build: Update MediaWiki requirement to 1.41" 2023-08-19 09:46:35 +00:00
jenkins-bot 207af66a10 Merge "Replace some moved Title class uses, now MediaWiki\Title\Title" 2023-08-19 06:14:08 +00:00
James D. Forrester 33ddbf9f4d build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I62fce93c9c2a454cfe556c2f3da49a6b32b04106
2023-08-19 13:31:14 +08:00
James D. Forrester 38c5c41a1e build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I15f88fd9e877f68680cb61d25bb50a4046aa8e46
2023-08-19 13:31:03 +08:00
gerritbot fd1e7e2a67 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I1c875fcf7456ea03420b316f58fcd18aa748301f
2023-08-19 04:17:34 +00:00
James D. Forrester f08789049b Use namespaced IDatabase class
Bug: T344536
Change-Id: Ia5fdf3242f9510e4f21670f3746d9364ae2935c6
2023-08-19 12:03:02 +08:00
Amir Sarabadani 88a24c402b Fix phpcs error
Change-Id: If047aa9a5cf26def9d1d9935294646f80ef92ffc
2023-08-19 04:51:28 +02:00
Bartosz Dziewoński 8c05a71beb Remove references to VisualEditorFullRestbaseURL
The VisualEditorFullRestbaseURL config variable is no longer used by
VisualEditor and is no longer set in Wikimedia production
configuration.

Bug: T344458
Change-Id: Ifd0b9f919f7a9bdceb8761125588fe72e8d1e50c
2023-08-18 20:17:48 +02:00
Translation updater bot 17c5d8a734 Localisation updates from https://translatewiki.net.
Change-Id: I4a6d186f95b6aeb68563591a616f681c1d2ab2e1
2023-08-17 12:10:22 +02:00
Umherirrender fb29f08e74 Use HookHandlers for core hooks
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T263364
Change-Id: Id8d9d0dcc6bb6ab60c5df3074803d132393415e9
2023-08-16 01:12:17 +00:00
Translation updater bot d6c041f348 Localisation updates from https://translatewiki.net.
Change-Id: Id81ea4ff7e24c7796c6a45d9d1b6e73b8fbd8f95
2023-08-07 08:38:55 +02:00
Daimona Eaytoy ffa687bc64 Avoid DB access in non-Database tests
Bug: T155147
Change-Id: I25b627b85179fe0e72386351e53de322c7a9c850
2023-08-05 15:07:40 +00:00
Translation updater bot a3d7b20ef5 Localisation updates from https://translatewiki.net.
Change-Id: Idce3448475d5f28be5d83e8e3c7fe388ad275f87
2023-07-31 08:59:06 +02:00
Translation updater bot 73f2bd4e70 Localisation updates from https://translatewiki.net.
Change-Id: Ib6a4019cb30727fd9794f32170c6c96f0343298f
2023-07-28 09:20:26 +02:00
Translation updater bot ce69e3f1c5 Localisation updates from https://translatewiki.net.
Change-Id: I438b408bddb9205443b3a9ac178c88abc1df4301
2023-07-24 12:38:01 +00:00
jenkins-bot 2458e0d578 Merge "Avoid using TestUser in non-database tests" 2023-07-18 23:50:37 +00:00
jenkins-bot 7dfddfed75 Merge "Add remaining mhchemtexified macros:" 2023-07-18 20:49:51 +00:00
Moritz Schubotz (physikerwelt) ef145e7b50
Add remaining mhchemtexified macros:
\mkern -> \mkern #1 (fun_ar1)
    \mskip -> \mskip #1 (fun_ar1)
    \smash -> \smash[#1]{#2} (fun_ar1opt)
    \mathchoice -> \\mathchoice #1 #2 #3 #4 (fun_ar4)
    \rlap -> \rlap #1 (fun_ar1)
    \llap -> \llap #1 (fun_ar1)
    \raise -> \raise #2 #2 (fun_ar2)
    \lower -> \lower #1 #2 (fun_ar2)

Bug: T340023
Change-Id: I61f0bdae53a53d5d301645dc9aa099d3377bff1c
2023-07-18 21:08:36 +02:00
Moritz Schubotz (physikerwelt) 88482a5e60
Extend test coverage for TexUtil to 100%
Change-Id: I74226a31f0fd5fb45066215d1075e6f42223f03c
2023-07-18 12:55:52 +02:00
Moritz Schubotz (physikerwelt) 26cfc111f9 Add usemhchemtexified option for mhchem texified output
Add a config option to enable passing special macros needed to
handle the output from the mhchem texify process.

Bug: T340023
Change-Id: I3553931c252184b54e7a13938e030825e5d45e59
2023-07-18 09:34:35 +00:00
jenkins-bot f6832d0235 Merge "Eliminate duplicate file" 2023-07-18 09:17:03 +00:00
Daimona Eaytoy 34d8441bc8 Avoid using TestUser in non-database tests
It needs a database connection to create the user, which is unnecessary
here.

Depends-On: I80723b886b2b5a5d75cbb73571e1b19ea4a09af5
Change-Id: I260b8ca433733b7754616e6e24778935597981a5
2023-07-17 23:36:23 +02:00
jenkins-bot 7af0761091 Merge "Add tex node with 4 arguments" 2023-07-17 12:39:14 +00:00
Translation updater bot cad44820fc Localisation updates from https://translatewiki.net.
Change-Id: Ibbe1e4af013923c803ea1186d2c420d29b2d0cb8
2023-07-17 10:17:56 +02:00
Moritz Schubotz (physikerwelt) 2d76cc24ac
Eliminate duplicate file
texutil.json exists twice with identical contents in
test and main sections.

Delete the redundant copy in the test section and access
the main file in tests.

Change-Id: Ie1eba9ed599d6826f1efe2d37bf8370f8e9dd036
2023-07-16 10:04:51 +02:00
Daimona Eaytoy a5c334fdbc Mock ExtensionRegistry in MathTest
The test doesn't need to depend on what extensions are
available/installed. Also pass the test config more explicitly to
ServiceOptions.

Needed-by: I0a04c82250582fed7a66c1e10868d9b4f3823a28
Change-Id: Id2587fe7d31fcd652c26e5dd0a8cfcae3161efcc
2023-07-15 19:11:18 +02:00
Moritz Schubotz (physikerwelt) 5677e7992c
Add tex node with 4 arguments
For the mathchoice command we need a syntax tree element that can
store 4 arguments.

Bug: T340023
Change-Id: Ieddd10e54240a4def6bed30cd299d804e8a121f9
2023-07-14 17:31:04 +02:00
Umherirrender 94ec268cb8 tests: Use correct expect message function in MathWikibaseConnectorTest
expectException needs expectExceptionMessage to be useful

Change-Id: Ic0b9d2e9ab05e958d86082886f1cef3f213919ad
2023-07-10 20:41:57 +02:00
Ed Sanders 149e5db0a0 Fix ContextItem documentation
* Be more specific about the type of context which a
  context item belongs to.
* Make grammar clearer.

Change-Id: I6f7abc777c378be2f1ac3f8db678363664d46ccd
2023-07-10 14:33:51 +01:00
Translation updater bot e64b976b69 Localisation updates from https://translatewiki.net.
Change-Id: Id2071ac366f78efa4a41b092ae09bc75d50e841e
2023-07-10 09:38:21 +02:00
Daimona Eaytoy 35d0f8ceb2 Update reference to tests/phpunit/phpunit.php
Bug: T90875
Change-Id: Ieee9a9bd8b24e42815fdbf98d374b54e084c8e9e
2023-07-02 18:27:24 +02:00
Moritz Schubotz (physikerwelt) 16d1fdacf4
Add WAN Cache for native MathML rendering
* Cache results for checked tex and MathML string in one cache.
* Remove access to parsetree
* Introduce run method to speed up service wiring

Note that the indirection table used in previous versions was
abandoned here. texvc does only little unification's of the
input string so that it is not expected that the overall savings
in space and compute time warrant the additional table.

Change-Id: Ib9ce3d2ab02bd9a2a0f9926db6b937435b7e5458
2023-06-19 23:04:08 +02:00
jenkins-bot ceea8068d0 Merge "Add MathML interface to LocalChecker" 2023-06-19 17:26:19 +00:00
Moritz Schubotz (physikerwelt) fc425b977c
Add MathML interface to LocalChecker
In preparation for caching we store the MathML fragment returned by
local checker. The rational is that the string serialization of the
parse tree is better chachable as the parsetree.

Change-Id: Ice2ef1f4f7b83ed187507d4d067f446603d0d6a5
2023-06-19 17:39:49 +02:00
Translation updater bot fd89b38374 Localisation updates from https://translatewiki.net.
Change-Id: I504b7005580616227df2a6793d666e37abbd7e01
2023-06-19 11:07:24 +02:00
Translation updater bot 05c897f168 Localisation updates from https://translatewiki.net.
Change-Id: I4e297529126333a21887169528ec62d05b5947ce
2023-06-14 13:07:21 +02:00
Translation updater bot a5eea48d1a Localisation updates from https://translatewiki.net.
Change-Id: Ifaad463bda7d7a045d635620d7b07ba98864c9cf
2023-06-12 13:07:43 +02:00
Daimona Eaytoy ce1078f7cf Catch more specific exception in MathRestbaseInterface
Follows-up: Ic44463e910911afe6395c38fd2f59b9bfa02a4f0
Change-Id: I95846304e2a81119df5a3785a3f30ae8349cc720
2023-06-09 13:01:53 +02:00
Daimona Eaytoy d06bd18532 Replace deprecated MWException
Introduce new classes for checked exceptions, and use SPL exceptions
for the unchecked ones.

Bug: T328220
Change-Id: Ic44463e910911afe6395c38fd2f59b9bfa02a4f0
2023-06-09 13:00:46 +02:00
Translation updater bot 7e54e8d7fd Localisation updates from https://translatewiki.net.
Change-Id: Ia697b5fd1cebdd1168d4f4d7d4419b06c10caf15
2023-06-08 10:39:44 +02:00
Moritz Schubotz (physikerwelt) 7c7b3324be Remove additional v1 suffix when computing internalRestbaseURL
Remove additional /v1 when computing internalRestbaseURL from
virtualRestConfig as this will be added in getUrl in MathRestbaseInterface.

internalRestbaseURL was introduced in I2fbc441955a1fe417f264f31f3729ce0715f7f16.

Bug: T334842
Bug: T338381
Change-Id: If2719fb9106e1414ce8814a2fbafa5dcedb84e39
2023-06-08 01:10:30 +00:00
jenkins-bot 03b185078b Merge "Create HookRunner class and the hook handler interfaces" 2023-06-07 09:39:56 +00:00
Ed Sanders bf9d8cef1d Always use the strict equality flag when using in_array
Change-Id: I555be3a62ee545304ea1ff7fdcffa3c4fbd25ab1
2023-06-06 13:35:12 +01:00
Umherirrender 28c5a67697 Create HookRunner class and the hook handler interfaces
Bug: T263353
Change-Id: I7ee943a262eba7d2f00fd05925676cc2351b7be9
2023-06-05 22:47:33 +02:00
Translation updater bot 3263379318 Localisation updates from https://translatewiki.net.
Change-Id: I407da55ece2e7c828a3acee0bdba21af6f764278
2023-06-05 08:40:59 +02:00
libraryupgrader 5f372144f7 build: Updating npm dependencies
* grunt-banana-checker: 0.10.0 → 0.11.0
* stylelint-config-wikimedia: 0.14.0 → 0.15.0

Change-Id: I09c6289cfe727fb2d545cbeeeac1a32c45ce9531
2023-06-02 14:27:02 +00:00
Umherirrender a967557107 tests: Call TestCase::createMock with $this
createMock is not a static function (like atLeastOnce)
It is easier to spot that this needs a TestCase when using $this

Change-Id: I6b738e31f43fd7ee2ecd608d0bb853a3ebac3121
2023-05-31 23:00:27 +00:00
jenkins-bot a4911d2283 Merge "Introduce MathInternalRestbaseURL setting." 2023-05-31 06:28:39 +00:00
daniel 43dd9c7f63 Introduce MathInternalRestbaseURL setting.
This new MathInternalRestbaseURL setting allows the internal URL of
Mathoid to be configured directly, instead of relying on
VirtualRestConfig.

This patch moves the fallback logic for the internal and external API
URL into an extension registration callback. This way, we can keep the
application logic simple, and we can issue config warnings that will
cause the updater to fail, forcing wiki owners to update their config.

Bug: T334842
Change-Id: I2fbc441955a1fe417f264f31f3729ce0715f7f16
2023-05-30 09:48:03 +00:00
Translation updater bot 095506a4ce Localisation updates from https://translatewiki.net.
Change-Id: I78d6e1b965ef524360e95c707654e6b0863c21b7
2023-05-29 09:59:32 +02:00