Commit graph

112595 commits

Author SHA1 Message Date
Reedy
2c88dd125b Upgrading wikimedia/xmp-reader (0.8.3 => 0.8.4)
Change-Id: I0ec33ce99c50a598207327947896ea32cbe35609
Depends-On: I4449457ca0daf06a7b0a8a746abee7f6b12ab974
2022-10-08 17:35:10 +00:00
jenkins-bot
8f715deea8 Merge "Fix passing the wikiId into ParsoidOutputAccess." 2022-10-08 12:23:50 +00:00
jenkins-bot
5faf4d2b5e Merge "chmod 644 some files that are 755" 2022-10-08 06:16:28 +00:00
jenkins-bot
d318eeaf8b Merge "tests: Upgrade PHPUnit from 8.5+ to 9.5+" 2022-10-08 01:02:15 +00:00
Reedy
e6308c4e52 chmod 644 some files that are 755
Change-Id: I7e4d3ebe47c2dd43e822897cf87a75028d740703
Follows-Up: I2a679b51758020d3e822da01a1bde1ae632b0b0a
2022-10-08 01:39:44 +01:00
Daimona Eaytoy
7a494d1fa4 tests: Upgrade PHPUnit from 8.5+ to 9.5+
* DeprecatedHooksTest: Don't use assertContains().
* Replace uses of deprecated asserts:
  - assertFileNotExists() -> assertFileDoesNotExist()
* Update hierarchy of MediaWikiPHPUnitResultPrinter, since ResultPrinter
  is an interface in PHPUnit 9.
* Remove temporary forward-compat methods.
* Remove directories that don't exist from tests/phpunit/suite.xml, since
  they now make PHPUnit exit:
   - tests/phpunit/skins, it used to have SideBarTest, then moved to
     tests/phpunit/includes/skins
   - tests/phpunit/documentation, it used to have ReleaseNotesTest, then
     moved to tests/phpunit/unit/documentation
* Update configuration with --migrate-configuration and reformat.
* Avoid redefining getMockBuilder() in
  ActionModuleBasedHandlerTestTrait, use a @method annotation instead.
* In RCCacheEntryFactoryTest, avoid using internal PHPUnit logic for
  HTML validation, and use native PHP methods instead. The code was
  copied from Xml::load (moved to \Xml\Loader::load in PHPUnit 9) and
  simplified for this use case.

Bug: T243600
Bug: T262076
Change-Id: I851b9158b73d0cfc315eed9d63b15c54b05895e3
2022-10-08 02:03:55 +02:00
jenkins-bot
b87e90747e Merge "Update specialPageAliases for Arabic (ar) and Egyptian Arabic (arz)" 2022-10-07 21:28:17 +00:00
Meno25
a9c7722a71 Update specialPageAliases for Arabic (ar) and Egyptian Arabic (arz)
Change-Id: I71a54cd7711cb18f4ea11a55e9faab34f8cb35b7
2022-10-07 19:51:49 +00:00
James D. Forrester
70b4f005b1 Follow-up b70581e4ca: Mention upgraded devLibs in RELEASE-NOTES
Change-Id: I138e171a33244c24fea90aab6e235b42c9473b4a
2022-10-07 15:40:17 -04:00
jenkins-bot
7be52b4c3b Merge "tests: Replace assertRegExp with assertMatchesRegularExpression" 2022-10-07 18:47:09 +00:00
Daimona Eaytoy
ee672592d8 tests: Replace assertRegExp with assertMatchesRegularExpression
And also assertNotRegExp -> assertDoesNotMatchRegularExpression. The
methods were renamed in PHPUnit 9.

Done automatically with:
  grep -rl assertRegExp tests/ | xargs sed -r -i "s/>assertRegExp\(/>assertMatchesRegularExpression\(/"
  grep -rl assertNotRegExp tests/ | xargs sed -r -i "s/>assertNotRegExp\(/>assertDoesNotMatchRegularExpression\(/"

Split out from Ifdba0f9e98eb6bce4590b7eb73170c51a697d7c6 so that it
remains smaller and easier to review.

Also make a test use MediaWikiUnitTestCase (it's already in the unit/
dir) so that it can access the forward-compat method.

Bug: T243600
Change-Id: Ifa279d5f201d7abeebece292141ebface8278046
2022-10-07 14:13:16 -04:00
libraryupgrader
b70581e4ca
build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 38.0.0 → 39.0.0
  The following sniffs are failing and were disabled:
  * MediaWiki.PHPUnit.AssertEmpty.AssertEmptyUsed

* php-parallel-lint/php-console-highlighter: 0.5 → 1.0.0
* php-parallel-lint/php-parallel-lint: 1.3.1 → 1.3.2

npm:
* grunt-banana-checker: 0.9.0 → 0.10.0
* grunt: 1.5.2 → 1.5.3
* karma: 6.3.15 → 6.4.1
* async: 2.6.3 → 2.6.4
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* got: 11.8.3 → 11.8.5
  * https://github.com/advisories/GHSA-pfrx-2q88-qq97

Change-Id: I1d7bc9c9599b48d2bd837617cad409a31adb362a
2022-10-07 21:09:37 +03:00
jenkins-bot
bb2fc938e5 Merge "Fix logic for formatting negative timezone offsets" 2022-10-07 16:39:42 +00:00
jenkins-bot
9c5fcba491 Merge "LanguageVariantConverter: Use content language code from HTTP header" 2022-10-07 15:54:29 +00:00
daniel
994e50d24f Fix passing the wikiId into ParsoidOutputAccess.
It's not clear if Parsoid still need this, but let's err on the side of
caution.

Change-Id: I7cef2827da23af3c3466cb855de5f42e05375515
2022-10-07 17:50:38 +02:00
Abijeet
715080cfd5 LanguageVariantConverter: Use content language code from HTTP header
Use the content language from the header, and give that the highest
priority when identifying the page language.

Bug: T317019
Change-Id: Ibb0671f1b873ef83a4d53824a9c4c17726e68635
2022-10-07 20:28:57 +05:30
Daimona Eaytoy
f6efe06b44 tests: Add forward-compat assertDoesNotMatchRegularExpression too
Follow-up to Ibce4c2479a533d132eb9f0641f8473fc6ca14fdb with the same
rationale.

Bug: T243600
Change-Id: I6bf543db387cbe934ef5ce353a8a978097f9a614
2022-10-07 14:35:18 +00:00
jenkins-bot
74436ac478 Merge "tests: Add temporary forward-compat method for assertMatchesRegularExpression" 2022-10-07 13:27:33 +00:00
Daimona Eaytoy
bbb62e3273 tests: Add temporary forward-compat method for assertMatchesRegularExpression
assertRegExp was deprecated in PHPUnit 9 and its replacement,
assertMatchesRegularExpression, was also introduced in PHPUnit 9. Hence,
we cannot migrate callers before the upgrade, but we also can't upgrade
before callers are migrated due to deprecation warnings. This is
especially true in extensions.

So create a temporary method that extensions can use while we
transition.

Bug: T243600
Change-Id: Ibce4c2479a533d132eb9f0641f8473fc6ca14fdb
2022-10-07 14:53:12 +02:00
Func
049d304dc2 preferences: Use 'timezone' type for the 'timecorrection' field
The GlobalPreferences extension are using types for the denylist and
classes for the allowlist, while every derivative class of HTMLFormField
defined in the core have a valid type registered.
So, we should use type instead of class here, which all the other fields
did.

Bug: T320238
Change-Id: I1cc59eaf6ed8ac1505eb79c6ecfc7f137c8e17a8
2022-10-07 12:42:59 +00:00
jenkins-bot
e769fa4a28 Merge "Remove unused property in ConditionalHeaderUtil" 2022-10-07 09:53:55 +00:00
jenkins-bot
08136b522a Merge "ApiSandbox: Replace obsolete IntegerParamWidget class" 2022-10-07 09:40:09 +00:00
jenkins-bot
dbfe69f250 Merge "Add @coversNothing to all structure tests" 2022-10-07 07:56:07 +00:00
jenkins-bot
c0845f10e3 Merge "Check whether title actually exists" 2022-10-07 07:08:15 +00:00
Daimona Eaytoy
1c60cafab4 Add @coversNothing to all structure tests
With PHPUnit 9, tests without @covers tags are considered risky and emit
warnings. Not having @covers is bad practice anyway, so use
@coversNothing instead to make the intention clear, and re-enable the
phpcs rule.

Also rewrite an assertion in ResourcesTest that was bothering me.

Bug: T243600
Change-Id: I6dd683f93b6b2faed5f107be2ca7860602277fbc
2022-10-07 03:21:54 +02:00
jenkins-bot
9961e13448 Merge "phpunit: Avoid deprecated at() matcher" 2022-10-06 23:14:44 +00:00
Daimona Eaytoy
0efa03ec0e phpunit: Avoid deprecated at() matcher
It was deprecated in PHPUnit 9, as tests should not rely on the
invocation order.

Bug: T243600
Change-Id: I8a4e44feb53d44aa9fd6facd5f85529d5bbdc45b
2022-10-06 18:57:24 -04:00
Matthias Mullie
58d9b4f8f0 Check whether title actually exists
Code a couple of lines below is dependant on $title
existing and having an id, but that's not explicitly
being checked.

If the result is not a valid title, there isn't going
to be a thumbnail for it.

Bug: T319798
Change-Id: I22c2ab886b3a1b1fdf2df062ffa76cd00d4d25fd
2022-10-06 22:53:02 +02:00
Derick Alangi
ab7849ed47 ParsoidOutputAccess: Add support for fragment flavor
This is needed by VE when performing Wikitext -> HTML transformation
during editing.

Also, this patch introduces the new flavor: fragment, that is passed in
via $envOptions to activate VisualEditor's body only mode functionality.

NOTE: This patch also fixes a PHPUnit test that broke by correctly
injecting the appropriate parsoid instance for checking error handling.

Bug: T308743
Change-Id: I838a3b05d7d8523a469236cf112158349063283c
2022-10-06 20:41:48 +01:00
jenkins-bot
077236c5b7 Merge "Installer: Disable logo dropper for now" 2022-10-06 19:18:04 +00:00
Jon Robson
d3f34664d7 Installer: Disable logo dropper for now
A follow up will restore this with required
functionality

Bug: T318753
Change-Id: I1a41d83594497ea7c64f358145d4eb24429fd7a5
2022-10-06 11:49:31 -07:00
Jakob Warkotsch
c5bf89c2df Remove unused property in ConditionalHeaderUtil
Change-Id: I5d257d0e5b2cd8f3769e4f067f717f1ea72848a1
2022-10-06 17:29:28 +02:00
jenkins-bot
6d0a6e34d4 Merge "Reduce the max width for the basic namespace filter on Special:Search" 2022-10-06 12:42:35 +00:00
jenkins-bot
ca5814e21f Merge "Re-apply: Introduce LanguageVariantConverter" 2022-10-06 11:25:39 +00:00
Simone Cuomo
6aa7b53b56 Reduce the max width for the basic namespace filter on Special:Search
- [x] Reduce Namespace width on all skins
- [x] Make sure vector legacy is unaffected

Bug: T319392
Change-Id: I6725e04479129a90fe956f389e35f2a3dfe25b6a
2022-10-06 11:34:12 +01:00
Mabualruz
f142f455a4 Merge "Skin: Map namespaces to associated pages inside runOnSkinTemplateNavigationHooks" 2022-10-06 09:06:04 +00:00
Translation updater bot
95a9874bb3 Localisation updates from https://translatewiki.net.
Change-Id: I3aa1f12dcc0ea432cd220551bd2feee74013b562
2022-10-06 08:03:31 +02:00
jenkins-bot
baf8e62ee5 Merge "ServiceWiring: Remove backcompat code and kill $wgShellboxUrl" 2022-10-06 03:49:34 +00:00
jenkins-bot
41b380cdf4 Merge "In the event of preg failure in MagicWordArray throw exception" 2022-10-06 03:33:51 +00:00
Daimona Eaytoy
7d7be44129 Fix typo in class name in @covers annotation
Change-Id: I41085b05e390d9903e750b5f6fbcc7ceed6b09e0
2022-10-06 00:27:00 +02:00
jenkins-bot
79ad263c46 Merge "html2wt: fall back to re-rendering if needed." 2022-10-05 21:49:05 +00:00
Jon Robson
5963a0ce42 Skin: Map namespaces to associated pages inside runOnSkinTemplateNavigationHooks
The runOnSkinTemplateNavigationHooks hook is used by skins to make final modifications
to the list of menu items, so we should check whether the hook changed namespaces inside
there rather than outside.

Due to this mistake  tabs disappeared from Special:Homepage

Bug: T319396
Change-Id: I81bcbf509eafdb6451849df62c52f411fba53fe5
2022-10-05 14:30:59 -07:00
jenkins-bot
f1ed360159 Merge "jquery.tablesorter: Remove 'url' parser for transforming sorted text" 2022-10-05 20:38:13 +00:00
jenkins-bot
6dd43ac12e Merge "WebInstaller::infoBox(): Remove extra indenting" 2022-10-05 20:12:26 +00:00
jenkins-bot
6ba3b1582e Merge "WebInstaller: Don't try and run trim() on null" 2022-10-05 20:09:13 +00:00
jenkins-bot
90cefec984 Merge "Escape link markers before replacement when building comments." 2022-10-05 19:39:07 +00:00
jenkins-bot
f3ba59d7c1 Merge "Allow large image previews by adding max image preview tag" 2022-10-05 19:12:04 +00:00
jenkins-bot
8d21c215a3 Merge "Redesign Special:Preferences for mobile" 2022-10-05 18:46:34 +00:00
jenkins-bot
8c38c964d6 Merge "fixDoubleRedirects.php: Work only with proper titles" 2022-10-05 18:27:05 +00:00
jenkins-bot
ba9dff8c8b Merge "Special:Contribute should not show permission error" 2022-10-05 17:50:30 +00:00