The array spread operator is documented to behave identical to
array_merge. The syntax is just much shorter and easier to read in
situations like this, in my opinion.
Change-Id: I3b016e896e552af53d87d5e72436dc4e29070ce1
When qery param type is defined as a string but given in URL as value in
the form of an array/list like: `q[0]=x` or `q[0]=x&q[1]=y`, clearly that
is a type to value mismatch and the framework should throw and let the client
know that this is a bad request.
Previously, the system will attempt a search using the array value which
will return incorrect result that match the search. Also, since there
are so many places where this is called, we needed to fix this in the
ParamValidator itself (as an edge case).
NOTE: If an array needs to be used as the value of the query parameter,
then ParamValidator::PARAM_ISMULTI should be set to true.
Bug: T326764
Change-Id: I507e5c4725b63d652771517ecd127da81082db31
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.
Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.
Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
There is a common and reasonable need for longer lines in tests.
The nudge for shorter lines doesn't seem valuable here. The natural
breaks will likely still fall in 80-100 given the enforced practice
for non-test code, e.g. whether through habit, or 80-100 column markers
in text editors, or the finite width of diff and code review
interfaces.
Change-Id: I879479e13551789a67624ce66f0946d2f185e6ee
Ended up using
grep -Prl '\->setMethods\(' . | xargs sed -r -i 's/setMethods\(/onlyMethods\(/g'
special-casing setMethods( null ) -> onlyMethods( [] )
and then manual fix of failing test (from PS2 onwards).
Bug: T278010
Change-Id: I012dca7ae774bb430c1c44d50991ba0b633353f1
No integration needed, except for maybe in
the tests for the UploadedFile* classes, which
are left where they are for now - those tests
deal with the file system.
Change-Id: I4f38557d524b2d36dea36a926d0f31e1afed5c7a
2021-04-14 23:57:20 +00:00
Renamed from tests/phpunit/includes/libs/ParamValidator/ParamValidatorTest.php (Browse further)