This data is the same as the 'credits' data that is already compiled,
cached and made available via ExtensionRegistry.
Similar to various other configuration variables previously, the
$wgExtensionCredits variable is now also required to only be used
for providing input to the system (e.g. from LocalSettings.php,
or from legacy extension PHP entry points). It is no longer
supported to use this variable to reliably read out a full view
of all extension credits (specifically those registered via
extension.json).
Doing so had the downside of adding processing cost to every
web request, as well as taking one the single largest portion
of the ExtensionRegistry APCu cache key, which in PHP7+ incurs
a linear cost for every string value, string key, of every
(sub)array in this huge structure; and does to on every request
just in case something reads from $wgExtensionCredits.
The new method to access this information reliably is owned
by SpecialVersion for now (could be moved elsewhere). This
also makes the merging logic more testable and incurs it on-demand
rather than upfront.
Details:
* Move 'type' internally from NOT_ATTRIBS to CREDIT_ATTRIBS.
These two arrays behave identically for most purposes (they are
both used to mean "don't export this as a global attribute").
By placing it in CREDIT_ATTRIBS it becomes complete and makes
it easy to refer to in docs. Previously, extractCredits()
read the 'type' key outside the loop for CREDIT_ATTRIBS.
* Remove redundant code in ApiBase.php, that is now more obviously
redundant. Looks like a left-over or merge conflict mistake
from when ExtensionRegistry was first introduced.
Bug: T187154
Change-Id: I6d66c58fbe57c530f9a43cae504b0d6aa4ffcd0d
Rather than each method reading directly from the global,
reduce this exposure to just one method, and pass it down from
there.
This is preparation for the next commit, which will consume
some of this information from ExtensionRegistry instead of
from a global variable.
Bug: T187154
Change-Id: I7d97a4cdc9ff3fe2b0be3b9367c4b783fe7388aa
In brief, the BlockLevelPass looks at opening and closing tags on a line
to determine whether it should do paragraph wrapping. The blockElems
want to stop wrapping when opened and start again when closed. The
antiBlockElems want the opposite, to start when they're opened and stop
when closed. "table" is a blockElems and "td"|"th" are anitBlockElems
so that content found in the interstitial spaces of tables are never
paragraph wrapped.
That means that, to date, "caption" elements are always found in a place
where paragraph wrapping is always suppressed and so adding them to that
set won't change any test results. However, a new test is added to spec
out this behaviour.
In the legacy parser, "captions" are always found in the right place
because handleTables runs at an earlier stage. In Parsoid, however, the
treebuilder is relied on to close table cells [0] so when we get to the
token stream paragraph wrappping pass, "caption"s are found in table
cells and therefore get wrapped, even though the treebuilder is about to
be induced to close the cell before opening the caption.
Therefore, in Parsoid, the fix would require us to make captions always-
suppressing to match the legacy parser behaviour. Thus, this change
here is just to keep these lists [1] consistent between the two
parsers.
[0] 5e11a3f390/src/Wt2Html/TokenizerUtils.php (L138-L151)
[1] 5e11a3f390/src/Wt2Html/TT/ParagraphWrapper.php (L71-L78)
Bug: T210647
Change-Id: I8ccefd69d47dca740f50924b235dffa3873d1f99
This newly-added method returns `false` on error; the caller expects
it to return `null`.
Bug: T253725
Followup-To: If36b35391f7833a1aded8b5a0de706d44187d423
Change-Id: I6af7aeabbba9f95338497026fd08d9ae23f75c22
Move handling of the different services that are created with
NameTableStoreFactory to ServiceWiring, so that MediaWikiServices
can just call $this->getService() and nothing else.
For objects created from specs via ObjectFactory, services are retrieved
via ContainerInterface::get( 'ServiceName' ), an alias for ::getService.
Since the different stores created with NameTableStoreFactory were not
individually defined as services, they would not have been usable
with an ObjectFactory spec.
Change-Id: I8f862efeffe91a8ca1c4cbc48a5c429d6c78973c
Reason for revert: issue arose again when deployed with wmf.34
Partial revert: keep the intended fix in Parser.php, revert
removal of fail-safe logic in CoreParserFunctions.hp
This reverts commit 2712cb8330.
Bug: T253725
Change-Id: I06266ca8bd29520b2c8f86c430d0f1e2d5dd20c0
This was changed in I38fa802 to string, which is not correct
Also use 'sidebar' which is more descriptive than 'bar';
Change-Id: I8f0bd444eb648882c489659d08a7fd6898adda57
Public access was deprecated in 1.32. Protected access is not
covered under the deprecation policy.
Bug: T250761
Bug: T250714
Bug: T249021
Bug: T250579
Change-Id: I47adbc316236be80672416a5c363a99c3dd53400
- BaseTemplate::msgWiki() has been removed
- QuickTemplate::msgWiki() has been removed
- Soft deprecated SkinTemplate:getPersonalToolsList() in favor of
::makePersonalToolsList().
Change-Id: I20cab798b0334050b9b30171ba99e5bd9503de3b
This is the behavoir for all known sublcasses (LoadBalancer
and LoadBalancerSingle), as they always resolve the given
$domain to its id (string value), so false no longer has
any special meaning.
Bug: T252019
Bug: T236880
Change-Id: I170a15a035a41af186cdf8a0b88f998df961c554
Unused outside of the EditPage class within deployed code, keeping it
public will prevent efforts to factor out a backend by maintaining
reliance on an EditPage object.
Bug: T252907
Change-Id: Ic9c95da636b05c5de15bf968ebe35586497d736e
This adds unit tests for the Handler base class.
This includes tests for public and protected methods.
Since the Handler base class is an extension point, the protected methods
are part of the stable public interface.
Change-Id: Ibe9fcbb139683dad03b92cd0618c3c0e8feb8b94
maintenance/blockUsers.php calls the hook with the result of
User::getBlock(), which is an AbstractBlock. So change the parameter
types from DatabaseBlock to AbstractBlock. This allows phan to pass.
Change-Id: I89f9aa87ec9a5f16133f43c2816f6b3441e5b102
Same as it will be or v2 when that patch merges
Change-Id: I64c3bbcda0f353fe9c14b0d5bea241e0304c0e2e
Follows-Up: I1a8657ff9fd14618c6709dbab62c3b4ee9f659a5