-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] remove Doctrine DBAL < 3.3 related code #52685
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
Hey! Thanks for your PR. You are targeting branch "7.1" but it seems your PR description refers to branch "7.0". Cheers! Carsonbot |
@@ -375,8 +375,7 @@ private function getServerVersion(): string | |||
return $this->serverVersion; | |||
} | |||
|
|||
// The condition should be removed once support for DBAL <3.3 is dropped | |||
$conn = method_exists($this->conn, 'getNativeConnection') ? $this->conn->getNativeConnection() : $this->conn->getWrappedConnection(); | |||
$conn = $this->conn->getNativeConnection(); | |||
if ($conn instanceof ServerInfoAwareConnection) { |
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.
Hmm, this does not really make sense. If we call getNativeConnection()
, we get the native handle of the PHP extension used, e.g. a mysqli
instance or an sqlsrv
resource. Those objects/resources won't ever implement ServerInfoAwareConnection
. Something's off here.
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.
I guess you are right. Looks like we first need to fix it in a way similar to #52715.
This PR was merged into the 5.4 branch. Discussion ---------- [Cache] fix detecting the database server version | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | #52685 (comment) | License | MIT Commits ------- 33a65ca fix detecting the database server version
This PR was merged into the 5.4 branch. Discussion ---------- [Cache] fix detecting the database server version | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | symfony/symfony#52685 (comment) | License | MIT Commits ------- 33a65ca9cd5 fix detecting the database server version
My alternative proposal: #52720. |
closing in favour of #52720 |
following the merge up of #52459