Repository navigation
Conversation
Several 5.0 changes need an entry in the update guide; adding the empty guide first keeps their pull requests from conflicting over its creation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QueryInterface::getBounded() and DatabaseQuery::getBounded() returned by reference for no reason: the bindings reference the value property of the bound parameter objects, not the array slots. Implementations no longer need to declare the reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
QueryInterface::&getBounded()andDatabaseQuery::&getBounded()returned the bound parameters by reference. The bindings reference$obj->valueof each bound-parameter object, so the reference has no effect; it only forces implementers to declare&. The&is removed from the interface and fromDatabaseQuery, and the driverexecute()methods assign the result normally (the same change as #404 on 4.x; the identical lines merge cleanly when 4.x-dev is merged up).Existing implementations that still declare
&getBounded()remain compatible with the interface (a by-reference return is accepted where a by-value return is declared); callers that use=&on the result get a notice, hence the update-guide entry.Alternative to #352 (kamil-tekiela), split into the 4.x and 5.x parts.
Testing Instructions
Existing binding tests (e.g.
testRepeatedSelectStatement, rebinding a variable between executions) pass;vendor/bin/phpunit -c phpunit.sqlite.xml.dist.Documentation Changes Required
Entry "
getBounded()no longer returns by reference" indocs/v4-to-v5-update.md.Depends on #404 and #410 (this branch is based on it).
🤖 Generated with Claude Code