-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
respect DB restrictions on number of arguments in statements and queries #25036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/backport to stable20 |
|
/backport to stable19 |
|
might lead to a small conflict with #24948 (execute method in our QueryBuilder), but nothing dramatic. |
36ed317 to
e7c2cd8
Compare
|
rebased and adjusted to the dbal bump. |
e7c2cd8 to
ef28844
Compare
|
Postgres says "no". |
aye. seems to be a form of off-by-1 But confirms the test is working 🚀 |
ef28844 to
90005a6
Compare
Signed-off-by: Arthur Schiwon <[email protected]>
Signed-off-by: Arthur Schiwon <[email protected]>
90005a6 to
f9484d1
Compare
Not anymore 🧑🔧 |
| $slice++; | ||
| $fdnsSlice = array_slice($fdns, $sliceSize * ($slice - 1), $sliceSize); | ||
|
|
||
| if (!isset($qb)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psalm:
TypeDoesNotContainType: Cannot resolve types for $qb with type OCP\DB\QueryBuilder\IQueryBuilder and !isset assertion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It occurs to me that Psalm does not understand the unset(), or am I wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimal example: https://psalm.dev/r/cd3ebd7a1c
Signed-off-by: Arthur Schiwon <[email protected]>
ChristophWurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has tests, so what could go wrong 👍
FYI https://www.php.net/manual/en/function.array-chunk.php seems a tad more elegant than manual slicing, but the result is the same
would have a bigger memory footprint as it would return all slices at once. |
Follow up of #25020
Additionally to what was stated before: