wiki.techinc.nl/tests/phpunit/unit/includes/libs/rdbms/expression
Bartosz Dziewoński 9ae6fbda79 rdbms: Warn when given an assoc array but keys are ignored
In some cases ISQLPlatform::makeList() will accept an associative
array (with string keys), but ignore the keys completely. Provide a
warning when this happens, and improve type hints so that Phan warns
about it too.

(We only warn about string keys, and not about gaps in an array
with int keys, because they arise often due to using array_diff()
or array_unique(), and that would trigger too many warnings.)

In Expression we already type-hinted it as a list (int keys with no
gaps), and we're intentionally less flexible about some other cases,
so check for gaps too and throw an exception instead of a warning.

Change-Id: I63717d16eae7cccd929b5d232944b97989113b1e
2024-05-20 17:20:28 +00:00
..
ExpressionTest.php rdbms: Warn when given an assoc array but keys are ignored 2024-05-20 17:20:28 +00:00