[9.x] Fix expectsDatabaseQueryCount() $connection parameter#46228
Merged
Conversation
The listen() function was assuming that the event was being dispatched for just that connection, rather than globally. Instead, we now check the connection name matches if it was provided. Fixes #45932
Contributor
Author
|
I think the checks failed because I created this PR against 10.x instead of 9.x. I'm not sure which version I should have targeted. My feeling was 9.x because the feature was only added 3 weeks ago, and didn't work as expected. |
Member
|
@giggsey I personally think this is a bug with the connection, rather than the test helper. Going to open a different PR to address the bug. |
Member
|
See #46231 |
Contributor
Author
Whilst I agree, I feel that's a bigger backwards incompatible change that has more potential to break user's applications. At the very least, should the additional test in this PR be added after your new PR? |
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.
The listen() function was assuming that the event was being dispatched for just that connection, rather than globally.
Instead, we now check the connection name matches if it was provided.
Fixes #45932