Note that CSS module filenames in this release have an extra 'Cdx'
prefix - this is a known bug that will be resolved with the next
release. For now, these files are not used directly, and are
properly tracked by the manifest, so there should be no discernible
changes. See T366206.
Bug: T363432
Bug: T363858
Bug: T364611
Bug: T364636
Bug: T364762
Bug: T364789
Bug: T364894
Bug: T364927
Bug: T364929
Bug: T364934
Bug: T365003
Bug: T365363
Bug: T366097
Depends-On: I04c1250aef3afbff43c11a012194263ec6b0f533
Change-Id: I4988a93e8cb0f33c198303403dde8d92223d63c4
This adds MediaWiki\Watchlist namespace to the classes of watchlist
directory and adds deprecation notice since 1.43 to the just created
unnamespaced aliases of the classes.
Bug: T353458
Change-Id: I4234f8fe62bb3bde6f5271c7ba31a2420b0f4b90
This adds MediaWiki\Content namespace to FallbackContent
and FallbackContentHandler and declares the unnamespaced version
as deprecated since version 1.43.
Bug: T353458
Change-Id: I3ee80aea379788b71539cc1c7a4ec216b753e042
This patch completes the rest of the ObjectCache refactor and
migrates methods to the appropriate class while deprecating them
in `ObjectCache.php`.
It also moves the `_LocalClusterCache` internal service logic
into ObjectCacheFactory and calls that instead making sure that
wiring code stays wiring code and let the class do the heavy lifting.
`::makeLocalServerCache()` is retained as a static method in the
ObjectCacheFactory class because it's called early in Setup.php
before the services container is available (so it needs to be stand-
alone).
To add, we also converts all global variables that were used in the
`ObjectCache.php` class into the config schema approach and retrieves
them using ServiceOptions injected in service wiring.
NOTE: MediaWikiIntegrationTestCase::setMainCache() was slightly
rewritten to take care of service reset which throws away the cache
object preserved by setInstanceForTesting() after service reset.
Instead, we preserve the object via MainConfigNames::ObjectCaches
setting with a factory closure which returns the correct cache object.
As a nice side effect of the above, the setInstanceForTesting() method
was removed entirely.
As a follow-up to this patch, I would like to remove the internal
_LocalClusterCache service in a stand-alone patch.
Bug: T363770
Change-Id: Ia2b689243980dbac37ee3bcfcbdf0683f9e1779b
A little history: This is the first time that the $linkTrail
regular expression uses \p with a script name and not explicit
characters or code point numbers.
Bug: T365365
Change-Id: Ia3cf06b8241f74772608179605f1fd7f08a08f8c
Trigger a deprecation warning if MessageCache::get gets called without
a Language object. On omitted parameter still the content language is
used.
Also change from $langcode = true to $language = null. This allows to
introduce a PHP type check in I8d0de2c7c2e6d087228844874d8251933b4acea4.
Change-Id: Ib27cfc0af090790daca3995fb1c3d78712d53ae6
I removed a lot of tests that were asserting value of this since this is
internal to database and it doesn't serve a critical purpose (it only
changes some log prefix)
Bug: T363839
Change-Id: I2930e4b489a41b7a1e1965a8ebf21b183bca773e
The current implementation of ExtensionRegistration violates the
documented behavior for extension registration, as described in
[[mw:Manual:Extension.json/Schema]]. According to the documentation,
when at least one of the global value and the default value is not an
array, the merge strategy is ignored and the global value will simply
override the default. However, an optimization incorrectly replaces a
configured empty array with the default null value.
The issue was fixed by applying the optimization after checking the
violated condition. Tests have been expanded for similar cases and
now additionally provide array diffs on failure.
WMF production configurations were evaluated with and without the
patch, and differences were analyzed on a per-wiki basis. This patch
results in two changes:
1. $wgCirrusSearchWriteClusters changes from null to []. This is the
desired behaviour.
2. $wgLiqudThreadsAllowUserControlNamespaces changes from null to [].
null means "no limits" and an empty array means "nothing allowed".
This matches the intended configuration and will be corrected
by this patch.
Bug: T365190
Change-Id: Ia3eaf6a607840e3e3134bded37e45050b7f247bf
The removed tests in LinkerTest were ported (or were previously
ported) to the new CommentFormatter framework in the CommentParserTest
class; some references to the LinkerTest class have been removed since
CommentParserTest is now the canonical location for these.
Cleaned up a bit more from the removed DummyLinker class as well
(I69689b2037269af3320b6203fc44755f93713489).
Followup-To: I69689b2037269af3320b6203fc44755f93713489
Change-Id: Ia743d13c4fe7f4e3e2bd11274895a261adbfd8e2
This was introduced to allow maintainers during local development,
and e.g. when debugging in production, to capture silenced runtime
warnings, such as those silenced via AtEase or the `@` PHP operator.
These are not expected to be of interest to capture by default on
web requests, hence placed in a separate channel that e.g. one would
only enable during development, or when debugging.
When this was introduced, MediaWiki was only just starting to
experiment with PSR-3 structuerd logging, and thus it hardcoded JSON.
Now that we support structured logging natively, this has been
obsoleted by the "error" channel (for warnings in production),
and (since last December) the "silenced-error" channel (for debugging
and development) with commit f6cb39979b (I34b19837c3).
With the above two alternatives available, there is no longer a need
for the duplicate "error-json" channel.
Bug: T193472
Change-Id: I7a6e6fa52a47a29ec04411a6c8b05e005a0a4fc7
Looking at all implementations, it only returns null or getServerId(),
which we already rely on in the only caller SqlBagOStuff.
Bug: T363839
Change-Id: I680e82d6d36548cd6bc351ab1d1fba48a827cbf3
DummyLinker existed for backwards-compatibility with a few hooks that
have since been removed, e.g. 'LinkBegin'. The last hook using it is
'ImageBeforeProduceHTML', and it looks like it can be harmlessly
replaced there with `null` (none of the extensions implementing the
hook use this parameter).
Change-Id: I69689b2037269af3320b6203fc44755f93713489
Document changes to hooks that were run from SpecialContributions
and ContribsPager, which are now run from ContributionsSpecialPage
and ContributionsPager instead.
Bug: T363358
Change-Id: I5e8fc87e7e98798d98b22405ca5cca5303945a91
This is useful to link to the talk page of a page that is only known by
its title without needing to parse it or make any API requests.
I originally had the class extend RedirectSpecialPage, but couldn’t make
the form work properly that way, so eventually I opted to extend
FormSpecialPage instead and implement the redirect behavior directly.
Cache behavior is moderately aggressive, pinned to the parser cache
expiry, as these redirects should only need to change when the
namespace settings are updated.
Bug: T242346
Change-Id: I531b0b061d1ff1fef9ceffd6c82dc34940ba653d
* Deprecate and stop using $wgBlockTargetMigrationStage. Remove
block_target migration code.
* Make the $schema parameters to DatabaseBlockStore methods default to
SCHEMA_BLOCK. Avoid passing these parameters where possible.
* Remove cleanupBlocks.php
* Deprecate DatabaseBlock static methods which try to present the old
schema for b/c.
Bug: T362133
Change-Id: I845bad8cc09a4528fef46a6f9d490ebdec881d99
Modules group together endpoints by a shared prefix. The idea is that each module has its own version and can generated self-contained self-documentation. This allows clients to have clear expectations about the endpoints of each module, no matter what wiki they are accessing. So far, each wiki may be exposing a different set of endpoints, with no way to provide a spec that describes that set of endpoints in a way that would be consistent across wikis and stable over time.
Bug: T362480
Change-Id: Iebcde4645d472d27eee5a30adb6eee12cc7d046b
Redirects from one route to another can now be defined in route
definition files like this:
{
"path": "/path/to/trigger/a/redirect/{foo}",
"redirect": {
"path": "/redirect/target/{foo}",
"code": 302
}
}
It is not necessary to specify the handler class.
The default status code is 308.
Path parameters and query parameters will be looped through.
Bug: T361840
Change-Id: Ib095681498874d90bdb7f970924906dc9a0f8c50
Legacy parser can now output headings using a more accessible markup,
which is also identical to the markup used by the Parsoid parser.
Changes to client-side JS and CSS necessary to support the new markup
have already been merged in earlier commits.
includes/skins/Skin.php
includes/ServiceWiring.php
* Define a new skin option, 'supportsMwHeading', which can be used
to toggle the new markup per-skin.
* Update the built-in fallback skin to enable it. This affects the
output in parser tests.
docs/config-schema.yaml
includes/config-schema.php
includes/config-vars.php
includes/MainConfigNames.php
includes/MainConfigSchema.php
* Add a new configuration setting, 'ParserEnableLegacyHeadingDOM',
which can be used to toggle the new markup per-site.
includes/OutputTransform/Stages/HandleSectionLinks.php
* Output new heading HTML for skins that enabled the option.
tests/*
* Duplicate parser tests that cover heading generation to cover both
new and old markup. Update other parser tests to use new markup.
* Add some unit and integration tests for the behavior of the skin
option and some parser tests for edge cases of the new markup.
Bug: T13555
Change-Id: I1180169a8e83af834c2984ba16089e6277f2a8dd