Make phan stricter about null types by setting null_casts_as_any_type to
false (the default in mediawiki-phan-config)
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T242536
Bug: T301991
Change-Id: I0f295382b96fb3be8037a01c10487d9d591e7e01
As part of making sure tests are not accidentally depending on global
state or some aspect of the skin, Special page, logged-out user, etc,
continue the removal of skin-specific code from SpecialJavaScriptTest.
This follows T131389 which previously removed the HTML layout,
stylesheets, and additional scripts from the test runner page already.
Bug: T89434
Depends-On: I9485b006804e243f9e022ca0668b290cf9d53f32
Depends-On: Ib20c1f5277c5d5a99f5117c82b7cbdeab75d3279
Change-Id: Iaf989bc50363a2525a922f745c0a1a6a992404f9
Make closeConnection() and doHandleSessionLossPreconnect() more
consistent with the base class by releasing named locks.
Change-Id: I7f7263c0d6b9473566ccb37113a30e6f360e8e29
The 'contentformat' param should only have effects when the parsing
is based on the 'text' param, as what the document described.
Bug: T206253
Change-Id: Ia12b8697e515c6ba89ea81f085292d1ef018bf58
All callers pass in floats and this is the expected type, used
to fill $microseconds.
Bug: T303628
Change-Id: I6c6176b4cc308646d86a5b9d2afdc91aadda4a0d
Format like 'application/json' is not supported for content model
wikitext, don't fail as internal exception.
This fix the case when providing text/title parameter.
Bug: T206253
Change-Id: I20ef52aa961143b7c50283c0d06acea9f220619c
Make phan stricter about scalar types by setting scalar_implicit_cast to
false (the default in mediawiki-phan-config)
Bug: T242536
Bug: T301991
Change-Id: Ia2fe30b17804186571722e728578121c8b75d455
We changed to operate on an int internally in I92daeb0f7be8a0.
Let's cast it back to a string for the api in order to prevent
a breaking change, which is not really necessary.
Bug: T304171
Change-Id: I5f5a9203b4dd085cb5defba72c6650532bc9e8d1
Storing ints and bools in the fields is confusing.
Cast to bool when setting. Use ints for the database.
Found by phan strict checks
Change-Id: I98b4f0e80182d29a1836f722d8739ecdb33bab05
It took me a good half hour to understand what these tests are doing,
and another half hour to build up a modicum of confidence that the
current behaviour is the indeed the desired behaviour.
* Remove random strings.
* Remove indirection and computed expected values as much as possible
in favour of inlined literals that explicitly expect outcomes.
* Remove confusing second argument from the data provider
getMultiWithUnionSetCallback_provider, which wasn't used, and
add labels to it.
* Remove some of the existing inline comments.
* Add some inline comments with what I've understood.
* Fix bug in "C: Repeat case with recently created check keys",
which claimed to be observing that caches were ignored due to the
check key being too new, when in fact it was a cache miss simply
because the key didn't exist yet upto this point. Make it actually
repeating by adding a second call afterwards to observe the
stated behaviour.
Bug: T303092
Change-Id: I874a20ecd49464f7b0e6a0b579c000dc0e804c0a
No need for the switch
phan does not see correct type for $rtt due to conditions
Also adjust $rtt to be a float as set by IDatabase::ping
Found by phan strict checks
Change-Id: Ia76e1062e06b00ae13d5c1a516d78b4e5cf6f1f5
The functions returns the block id, which is typed as string.
Also MWCryptHash::hmac needs a string
Found by phan strict checks
Change-Id: I457dd094d033671c22e221a94746579a25fe8b7a
We can generate a class that contains constants for all config variable
names. This removes the need to rely on string literals when calling
Config::get, and it provides a place for documentation that integrates
better with IDEs than the markdown file.
Change-Id: I817dc14c4ce8fc0a29d9c07e8fd393c4f359cade