isset returns false for null and the null values are not compared,
that treats them as non-default, even the default is also null.
Bug: T291748
Follow-Up: I6e61c11d8aed27b4b559e74849e0056e5eef3638
Change-Id: I0a0932b403098967c261eee3dc0e7d5da3c4fffb
NamespaceInfo was added in
I4af843238ffd58925f57c0f7b98253a90cb285ec
and removed in:
I5c9ea04a9deca136bb7210f07200d18f97fd6686
Change-Id: I64612b57b0e5e5c7c126d7434e5b108fc735ac57
Use ContentRenderer::getParserOutput instead.
Extensions defining a content model should override ContentHandler::fillParserOutput.
Update tests.
Bug: T287158
Change-Id: I1c71a8429806f1813a39f5807256b2eb9fb9901f
As of PHP 7.2, parse_url does not correctly handle ports on protocol
relative URLs. Ensure that we properly compensate for this.
Bug: T294559
Change-Id: I52c661cbff5e6f28120b50111659255d712d6887
This reverts commit 66e58d1ea7.
Reason for revert: let's revert and hope this will fix T294559
Bug: T294559
Change-Id: I2e4ae268e288f87b6c80fac08d275118f5b5cbd7
Inspired by T290004, attempting to solve that ticket will be done
in the next patch on this one.
Bug: T290004
Change-Id: I431e3eba1bcfb446a4ab60aa3d2189762ea9f65f
This way the intent is clearer, and it also properly covers the case
where the exception isn't thrown.
Change-Id: I7831382956d5bc204b695fecc47f7111519d53af
Do it self to avoid the global state of the Timing class within the
resourceloader.
Replaced the deferred update with a scoped callback to send stats on all
possible return path for the called function, but directly when needed
and not deferred, which can make wrong times.
The old code was using a fix mark set be
MediaWiki::doPostOutputShutdown, where a defered send does not has
impact of the send stats
Change-Id: I5fec6a73db3e7c3ac6a6ac33bb293727ae3a38ca
LinkCache::addGoodLinkObj was hard deprecated.
Use addGoodLinkObjFromRow() instead. PHPUnit tests
must use LinkCacheTestTrait::addGoodLinkObject().
Bug: T284955
Change-Id: I0c22be2f00e6d6d4ba6dd1511c5385cad55e8ff7
After the hooks were removed we are finally ready to stop
reading user options from primary before writing them on save.
The new save hooks only work on modified options, so options
saving code can be significantly simplified.
Change-Id: I48df616c9f35d9a0b2801ada1b7dbef0bd4ad058
* Do not store table of contents in parser output
* Instead inject table of contents via strpos where needed
inside Article based on Skin "toc" option
* Use <mw:tocplace> as a TOC placeholder; for Parsoid compatibility
this will be replaced with a <meta> tag in a followup patch.
Bug: T287767
Change-Id: I44045b3b9e78e7ab793da3f37e3c0dbc91cd7d39
Without a default the preference is treat as unknown and possible values
identical to the default are not excluded from javascript code or
database.
Bug: T291748
Change-Id: I37cf1cd87a5ef1fd91aba0c3cc4b0e3f9c9c08b4
This reverts commit 98878c08ba.
reason for revert: had some weird and unwanted side effects
Bug: T294265
Change-Id: I53c2175498af5b37096505dae011e65cebf029aa
Create ArchivedRevisionLookupTest to test ArchivedRevisionLookup.
Expand tests a bit and add two more for ::getPreviousRevisionRecord.
Change-Id: I3e176b24a13479464b7e73d062639ecb4db86f8f
User::isRegistered is part of the UserIdentity interface,
which makes moving from heavy User class to UserIdentity easier.
Change-Id: If44bfd398694c509272b3f89c93473b2e3c05759
Also various other code clean ups:
* Fix warning during PHPUnit coverage run for invalid @coverage target:
> 1) Wikimedia\Tests\Metrics\MetricTest::testValidateLabels
> Trying to @cover not existing class "\Wikimedia\Metrics\Metric".
* Move "expectException" lines to right above the expected failure
instead of at the start of the method, which aligns with how this
is typically done in PHPUnit tests.
* Remove TestCase constructor overrides. This is not supported by
upstream. We generally use setUp() or setUpBeforeClass() for this.
In this case, remove it entirely in favour of NullLogger without
any re-use between test methods.
* Change github.com URL to permalink.
* Favour early returns for error handling to separate input validation
from storing in-object which makes it harder to separate what is and
isn't valid at any particular point. This is mostly for consistency
with other MW code, but also happens to make the code simpler in
this case.
Bug: T240685
Change-Id: I36368cc0aadff7e24fe55dec2eda1365efd779af