HookContainer::salvage() expects to be called immediately after the
object is constructed, and I enforced this expectation by asserting that
$this->handlersByName is empty.
However, MediaWikiServices::resetGlobalInstance() calls
HookContainer::run() in between construction and salvage(). The effect
is that the assertion is hit if any hooks were executed using the old
HookContainer.
So, call onMediaWikiServices() using the old pre-reset HookContainer,
instead of using a partially-constructed HookContainer for this purpose.
Pass the new MediaWikiServices instance as the argument, since that is
the thing that the hook is configuring.
Bug: T263925
Change-Id: I2b462d82c82314b11563a5ba1f02c6fb6d29e608
RevisionStoreDbTestBase is mistakenly passing an array instead of an integer as
a query flags parameter in many places, which eventually gets passed to
DBAccessObjectUtils that uses it with a bitwise operator. PHP < 8 handles this
silently, but PHP >= 8 throws "TypeError: Unsupported operand types: array &
int" here.
Bug: T248925
Change-Id: I4e29b2709fe5e6d583727d45e005b3f16a1e3f4d
Replace direct access to $wgDisableLangConversion with
LanguageConverterFactory::isConversionDisabled(), and replace direct
access to $wgDisableTitleConversion with
LanguageConverterFactory::isTitleConversionDisabled(). However, most
places that check ::isTitleConversionDisabled() actually want
::isLinkConversionDisabled(), so add that too (and deprecate
isTitleConversionDisabled()).
Code search:
https://codesearch.wmcloud.org/search/?q=Disable%28Lang|Title%29Conversion&i=nope&files=&repos=
This change removes a number of spurious dependencies on the global
configuration and reduces code duplication (for example, if the logic
for disabling language conversion were ever to change).
Depends-On: I6fa8230ae97b0e34c381003548e61f9b7387d363
Change-Id: Icc4687638ff1815003dd903854efdbd904854f1e
The function SpecialPage::getLanguageConverter does not use service
injection and it seems not useful to inject the factory into every
special page when not used on each special page or used from code
directly in the SpecialPage class.
Bug: T259960
Depends-On: I550f2db0c652193755ad4ad04cececad00be72ea
Change-Id: I11e5d67b7051c159b8d32bf056a0e24aa3b526ae
This covers only directly used services by this special page and pager
Services used by the base class are not part of this patch set
Bug: T259960
Depends-On: I62855be191ea87bdc5157b6ab879c47815644156
Change-Id: I730ce17548fad3e35e8d8b6730eb3aafd734eac9
Follows-up cd54c03e86, in which I forgot a call to setScheme()
in the `isServerLess` branch.
For "server-less" URLs, we mock both schema and host, but only
strip the host. This left something I did not think was allowed
in the Net_URL2 class, which is to produce a URL that has a full
protocol and scheme, no host, and then a full path.
Moreoever, not only is this allowed by the Net_URL2 class in PHP,
modern browsers Firefox and Chrome also actually support this
and interpret it as a "domain relative" (?) URL.
Bug: T268308
Change-Id: I26ed3e5e9a6922badd979bbe6f5588e319ec3ebb
This covers only directly used services by this special page and pager
Services used by the base class are not part of this patch set
Have to change another service to avoid global state
Bug: T259960
Depends-On: I07203e22f4b254df5c8cd6180d915a1537b7de30
Change-Id: Ifed2cbd2eee7166daf2e7d9bab017786247f88f6
Check the internal array of styles to determine whether
the method was inappropriately used to alter the array of styles and
if it was, call wfDeprecatedMsg().
Change-Id: I591b03c2e19d4b8cadfe220b498ae244d332f9fb
The commit did not really hard-deprecate overriding of setupSkinUserCss() as stated in the commit message, rather it removed core calls to setupSkinUserCss(), instantly breaking the many skins that still override it. It did not actually create a deprecation period for graceful migration.
As discussed in T267080, there is presently no way to hard-deprecate the override of a method.
This reverts commit 334cfeffd6.
Bug: T257990
Change-Id: I8f669ba30affc437800890c3a875994a9f2eb3c8
This covers only directly used services by this special page
Services used by the base class are not part of this patch set
Bug: T259960
Change-Id: I4baff83b8c7bb5bd1f5b00369bfc3cec70c2391a
This covers only directly used services by this special page
Services used by the base class are not part of this patch set
Bug: T259960
Change-Id: Ia4a022719f572952dcb62953c8819feb3326eccd