Commit graph

8 commits

Author SHA1 Message Date
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
Jon Robson
e8096656e7 ResourceLoaderSkinModule: Document new interface styles
Follow up to Ib5ae640bb260cee46e654228b785c776722c7003

Bug: T316027
Change-Id: Ia6af9fb213d8bd5b18ec95371489cfa0bdf7ed64
2022-08-26 14:19:20 +00:00
Jon Robson
ac389cf0f0 ResourceLoaderSkinModule: Split up interface feature into multiple parts
While working on the site notice in Vector we've noticed these
styles are proving more problematic than helpful so splitting these
up allows us more granularity in the styles we ship.

The core interface styles are now enabled by default as they contain
important logic relating to empty portlets and the print footer

Bug: T316027
Change-Id: Ib5ae640bb260cee46e654228b785c776722c7003
2022-08-24 13:59:17 +00:00
Timo Tijhof
ca4e16393b resourceloader: Resolve SkinModule wordmark/tagline tech debt
This was added as a workaround for the invalid values committed to
Beta Cluster config in I021e7b4003a. As I wrote then, boolean false
is not a valid value there for SkinModule. Instead of fixing this,
it was worked around in core with 4de725083 (Ie86a5b59).

Thiemo and Tim fixed the invalid Beta config last week with
164945371a (Id2712e2a), which was done as part of fixing outstanding
PHP 7.4 warnings, because despite the core workaround above, another
change to SkinModule later on introduced the same reasonable
assumption in another part of the code, that it would not be
invalid/false, but only null or string.

See also CR at:
* <https://gerrit.wikimedia.org/r/663263> (invalid config)
* <https://gerrit.wikimedia.org/r/719308> (original core change)
* <https://gerrit.wikimedia.org/r/719500> (revert core change)

Bug: T207038
Bug: T310767
Change-Id: Ieeff6198dff34de16dadb5c0347dbdae7bcf3a08
2022-06-21 20:23:48 +01:00
Tim Starling
a5b44d60f1 resourceloader: Don't raise notice when the logo wordmark is false
Fix notice on PHP 7.4+ when the wordmark is false. It is false on the
beta cluster and Mustache doesn't mind if it is false. Update docs.

Use !empty($x) as a shortcut for isset($x) && $x in two nearby places.

Bug: T310767
Change-Id: Ie33f8edf075f1216881428ec6aa29cae1dac4e64
2022-06-16 14:10:40 +10:00
Tim Starling
3e2653f83b ResourceLoader namespace (attempt 2)
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader itself.

Move the tests by analogy.

I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".

I did not address DependencyStore which continues to have a non-standard
location and namespace.

Revert of a241d83e0a.

Bug: T308718
Change-Id: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
2022-05-24 15:41:46 +00:00
Lucas Werkmeister (WMDE)
a241d83e0a Revert "ResourceLoader namespace"
This reverts commit e08ea8ccb9.

Reason for revert: Breaks Phan in extensions, and as far as I’m aware,
this change isn’t urgently needed for anything, so the simplest fix is
to revert it again for now. After PHP 7.4 it should be safer to try this
again (we hopefully won’t need the two “hack” classes by then).

Bug: T308443
Change-Id: Iff3318cbf97a67f821f78e60da62a583f63e389e
2022-05-16 14:43:33 +00:00
Tim Starling
e08ea8ccb9 ResourceLoader namespace
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader and
ResourceLoaderContext.

Move the tests by analogy.

I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".

I did not address DependencyStore which continues to have a non-standard
location and namespace.

Change-Id: I92998ae6a82e0b935c13e02a183e7c324fa410a3
2022-05-16 14:41:27 +10:00
Renamed from includes/resourceloader/ResourceLoaderSkinModule.php (Browse further)