Amongst other things, this version of phan bundles taint-check, which is
however disabled in the config file because there are lots of issues to
be fixed.
Upgrading phan alone now means that we can have a clean baseline for the taint-check upgrade.
Bug: T248630
Change-Id: I8ab7ef9a9e73952098664176aad6c2b3b88095ee
Updated Doxygen markup in several .php files triggering warnings when mwdocgen.php is executed. Removed
obsolete settings MSCGEN_PATH and TCL_SUBST from Doxyfile. The former would generate a warning in 1.8.16
while TCL support was removed in 1.8.18. Since TCL_SUBST was blank anyway, it was removed prior to getting
to .18 in production. Increased DOT_GRAPH_MAX_NODES from 50 to 200 since Doxygen complained about it being
too low for API and Maintenance.
Bug: T248706
Change-Id: I9c67f0807d1b43089d351263d4f591dee5501f36
The HTMLUsersMultiselectField and HTMLUserTextField fail validation when an
empty string is passed to a non-required form field. To prevent this, the
widget should pass the validation to the parent when the value is an empty
string.
Bug: T246958
Change-Id: I39df2b575b90a4648188ed3ef4cc0c38ac553636
Repeating the variable name doesn't do anything. Documentation
generators don't need it. It's more stuff to read that doesn't add new
information. And it can become outdated.
Note there are two types of @var docs. When used inline (and not on a
class property) the variable name is needed.
Change-Id: If5a520405efacd8cefd90b878c999b842b91ac61
Pass through config options from HTMLUserTextField that allow the
field to accept an IP address and/or range, and specify the maximum
allowed range size.
Bug: T238277
Change-Id: I0e0f6b6fd6801d5cd561def28917e81a81b3f7d4
Introduce a more specific message for when the number of selected items
exceeds the maximum number allowed.
Change-Id: I359b65ac397b4acef32940ff8ff9af33651f7a7b
This is for classes with a single undeclared property - aside from
BlockManager: I3f51fd3579514b83b567dfe20926df2f0930dc85 removed the
declaration of $permissionManager without actually removing all uses.
Change-Id: Ic2a95f77071312041be6e0633ea9b5325e98de42
This allows us to remove many suppressions for phan false positives.
Bug: T231636
Depends-On: I82a279e1f7b0fdefd3bb712e46c7d0665429d065
Change-Id: I5c251e9584a1ae9fb1577afcafb5001e0dcd41c7
All of these suppression prevent the detection of many common mistakes,
and could easily prevent things like T231488. Especially if there are
few issues of a given type, it's way better to suppress them inline,
instead of disabling them for the whole core.
This patch only touches the one with a lower count (although those
counts may be out of date).
Bug: T231636
Change-Id: Ica50297ec7c71a81ba2204f9763499da925067bd
Alters the SelectWithInput to allow a required config to be passed from a
parent widget. Also handles the required state dynamically. If the widget is
an OR widget, then only the select dropdown is required. The text input will
be required when the other option is selected. If the widget is an AND widget
then both the select dropdown and the text input will be required.
Bug: T220533
Change-Id: I8479743126756f2b1bd7bcd53b100a0134f34d07
The return type of HTMLFormField::loadDataFromRequest to mixed
Some sub classes returning arrays or bools, not everytime strings
HTMLCheckField is working with arrays, so also allow array on getTableRow
Change-Id: I076feea76d8e296f27c8a9fb4cbd9368584ba187
Bring HTMLSelectAndOtherField in line with other HTMLFormFields by
ensuring that the default value is of the correct type and passes
validation checks.
Also make sure HTMLSelectAndOtherField::validate checks for the
final value, if the field has required set to true.
Bug: T222170
Bug: T225860
Change-Id: I949ee3df2b1f597982cf522b149c54b8e79d59bc
The button must have an ID to be able to be infused. If the given ID
is null, that's fine, OOUI will generate one. But passing an empty
string apparently disables that.
Bug: T222013
Change-Id: I96e1f838385c5539ed246d2ee7107cd037a5f338
When JS is disabled on Special:Block you were able to specify
any namespace as part of the namespace restrictions field. This patch
rejects any virtual namespace submitted on that field
Bug: T216831
Change-Id: If09c43e5f836e1fdd9438b856d7f44f434c29fe1
For those that still need the precision of time, the
DateTimeInputWidget can be used.
Bug: T107069
Change-Id: I2e0b0168b53594760c2630dc4ecd4e6af7404a7c
This is inspired by Ib117e05.
As far as I can tell this is functionally identical. Even arrays should
behave the same, as both the getVal() and getCheck() methods do have a
special case that returns the `null` default in case the user tried to
pass multiple values instead of a single scalar.
Change-Id: Id4e4ec91f39d3c39461bd41673bdafc3bde11737
According to the coding standards we even enforce with a custom PHPCS sniff.
It currently does not pick these mistakes up because of the curly brackets.
I'm not sure if this is worth an update of the PHPCS sniff. I wanted to
suggest this fix anyway.
Change-Id: I9041ea7a00baf7f55e0ff0e56879a89fb74bb479
This was originally directly under includes/htmlform. This is
a specific type of field, so it should go here instead.
Follows-up d0c31ac988.
Change-Id: Iac196068ce2cbca063948bc78d21913482717d9a