Commit graph

9 commits

Author SHA1 Message Date
Amir Sarabadani
f5abfb8d58 Bump codesniffer to 42.0.0
Most noisily, this enables MediaWiki.Arrays.OneSpaceInlineArray.

Change-Id: I8ab11399c67ce7e3ab1b6249b591452774393428
2023-09-27 15:06:32 -04:00
Fomafix
ed7c0c860e Use namespaced specials in tests
The not-namespaced classes are deprecated since change I735222c437
(commit ea2979b8ca) and other changes.

Also use the recommendation for @covers from
https://docs.phpunit.de/en/10.3/annotations.html#covers

> Please note that this annotation requires a fully-qualified class
> name (FQCN). To make this more obvious to the reader, it is
> recommended to use a leading backslash (even if this not required
> for the annotation to work correctly).

Update the test class names and file names
from SpecialBooksourcesTest to SpecialBookSourcesTest,
from SpecialRecentchangesTest to SpecialRecentChangesTest and
from SpecialRandomTest to SpecialRandomPageTest
to match the corresponding special page class names.

Change-Id: I3c0e80c6219c5085e28338601617599e09bd05de
2023-09-22 21:39:29 +00:00
James D. Forrester
1d0b7ae1e2 Namespace User under \MediaWiki\User
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
2023-09-19 19:18:16 +00:00
Func
4d1da6f7f8 phpunit: Update @covers annotations for namespaced classes
We renamed many classes to be namespaced, but the `@covers` and
`@coversDefaultClass` annotations weren't updated properly.

PHPUnit didn't support short cover annotations with `use` statements,
these didn't trigger any errors yet, because they are class alias.

This patch is populated by a modified version of PhpunitAnnotationsSniff.

Change-Id: I6c602290a30099239b17d2dc0d67b1488b4eaeeb
2023-05-27 17:43:12 +08:00
James D. Forrester
833ba2a3fd Namespace SpecialC* under \MediaWiki\Specials
Change-Id: Idbdacc20d45437d141c1a0d5f2eee98ae9345875
2023-05-03 06:15:57 +00:00
Moh'd Khier Abualruz
2dfe4a923b Skins: Config flag controls contributions link
This restores a rewritten version of
commit 78483caaaf.

- Special:Contribute the default entry point in the menu when enabled
- Otherwise it will link to Special:Contributions (default behaviour)

Depends-On: I65336cfd56e1f6b92c1b3bc83cb5d91bbca065bf
Bug: T319327
Change-Id: I67779b88c4904462f9d847b3edb08a65306b2bfb
2022-11-08 10:33:39 +01:00
Tim Starling
0077c5da15 Use short array destructuring instead of list()
Introduced in PHP 7.1. Because it's shorter and looks nice.

I used regex replacement.

Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
2022-10-21 15:33:37 +11:00
Moh'd Khier Abualruz
6d6c8db99c The Special:Contributions page should show tabs to Special:Contribute
Follow up to
- I7f064a954a77373dfec86efae7e378402f500198
- Iac34777a89e3e6732a0916dbf0a22677cbc6d121

Bug: T319240
Change-Id: I90f943744d2ca0d384a3b378dce473b9f1edafb6
2022-10-04 23:04:49 +00:00
Moh'd Khier Abualruz
58780e5279 Persistent contribution entry point on the mobile navigation menu
* Add new special page SpecialContribute
* Added messages and aliases for EN language
* Add classes to carry cards Data
* Added Hook ContributeCardsHook for adding/removing updating cards
* Moved HTML to template
* Added main page and 1st tab styles
* Removed the dependency on minerva skin code
* Added Unit Tests
* Fixed Jenkins, and qqq messages
* Added an override for getShortDescription in special pages to generate unified tab message keys

Bug: T286466
Change-Id: I7f064a954a77373dfec86efae7e378402f500198
2022-09-28 16:45:06 +00:00