Commit graph

8 commits

Author SHA1 Message Date
Bartosz Dziewoński
3781349e27 Use real type hints for services etc. in includes/Permissions/
Mostly used find-and-replace:

Find:
/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|)
Replace with:
\3 \1 \4

More could be done, but to keep this patch reasonably sized, I only
changed the most obvious and unambiguously correct cases.

In some cases, I also removed redundant doc comments on the
constructor, and re-ordered the properties to match the constructor.

Change-Id: I3f8427ae4f5d55177ae18986ef15d84d0e7bf6f4
2024-07-31 08:56:17 +00:00
Timo Tijhof
a2b9e84c22 Permissions: Widen @covers tags in tests
> We lose useful coverage and waste valuable time on keeping tags
> accurate through refactors (or worse, forget to do so).
>
> Tracking tiny per-method details wastes time in realizing (and
> fixing) when people inevitably don't keep them in sync, and time
> lost in finding uncovered code to write tests to realize it was
> already covered but "not yet claimed".
>
> Given all used methods are de-facto and liberally claimed, and
> that we keep the coverage limited to the subject class, this
> maintains the spirit and intent. PHPUnit offers a more precise
> tool when you need it (i.e. when testing legacy monster classes),
> but for well-written code, the class-wide tag suffices.

Ref https://gerrit.wikimedia.org/r/q/owner:Krinkle+is:merged+message:Widen

Change-Id: I89f510232554fddeaff90e264e3b396448623888
2024-04-11 22:11:56 +01:00
James D. Forrester
eeb5a740b3 Namespace Message, move to appropriate directory
Bug: T353458
Change-Id: I088cbc53fbcdb974e5b05b45a62e91709dacc024
2024-02-14 15:10:36 -05:00
Bartosz Dziewoński
f85ebfb1df GrantsLocalization: Move grant risk level labels from CSS to HTML
Change-Id: I6c4ed496cd74f0d59e6b71e5d6d37abcc80a4914
2024-01-16 23:55:48 +01:00
Gergő Tisza
a74230cc6b BotPasswords: Show risk level of grants
* Make GrantsLocalization add CSS classes indicating risk level
  to grant names.
* On Special:BotPasswords, unlink the grant names. Instead, fix
  formatting of the tooltips (containing the same information)
  and move the help text (linking to the same page) above the
  checkmatrix so the user notices it before starting to check
  things.
* Color grant names by risk level; add color legend to the help
  text.

Bug: T290790
Change-Id: I9f21273d5a1db92d8656fdf8b656b5ea8161bb23
2024-01-16 23:55:48 +01:00
James D. Forrester
459cbb0494 Namespace remaining 'specialpage' files under \MediaWiki\SpecialPage
SpecialPageFactory is already here, but none of the others were yet.

Bug: T166010
Change-Id: I9689bf0a1ab329625e23669b99f019b96295fffd
2023-09-18 18:23:13 +01:00
EpicPupper
8ad4530c4a Clarify wording for high-volume grants
Bug: T70312
Change-Id: Id289cd298393e213426d2e4fe38b3a32f53b5dfd
2023-01-12 23:17:51 -05:00
Alexander Vorwerk
ecbaedbad2 Reapply "GrantsInfo service to replace MWGrants"
This patch adds a service as a replacement for MWGrants. This is done
as it allows proper dependency injection of used services and
configuration settings.

This was previously committed as Iac52dba15f and reverted because it
introduced recursive service instantiation.

To avoid this recursive service instantiantion all UI related methods
get moved to a new GrantsLocalization service, instead of the GrantsInfo
service.

Bug: T253077
Change-Id: Ib900bc424fc272ec709d272dcaff71398fa856f8
2021-09-18 08:52:22 +00:00