Only pass the additional arguments if they are not null#3984
Only pass the additional arguments if they are not null#3984duncan3dc wants to merge 1 commit intodoctrine:2.10.xfrom duncan3dc:fix-pdo-fetchall-parameters
Conversation
greg0ire
left a comment
There was a problem hiding this comment.
Can you please add some tests?
|
Any advice on how you'd like that done? It looks like you're using PHPUnit for mocking here, which doesn't support verifying that no argument was passed, it always substitutes in the default value anyway. So mocking doesn't appear to be an option. It looks like you set up some databases, would you prefer an integration test with one of these database servers? If so, which one and where should the test case live? |
|
Since the issue arises in the form of an SQL error, an integration test makes more sense. You can run it against all DBs, and it should live under On a somewhat related note, I see that kind of question coming back again and again: #4012 (comment) We should really work on providing that kind of guide 😅 |
Summary
Following on from #3893 this PR ensures the additional arguments are only passed when they are non-null, as issues were reported in #3975