File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/Symfony/Component/Cache/Adapter Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -421,17 +421,14 @@ private function getServerVersion(): string
421
421
return $ this ->serverVersion ;
422
422
}
423
423
424
- if ($ this ->conn instanceof ServerVersionProvider) {
425
- return $ this ->conn ->getServerVersion ();
424
+ if ($ this ->conn instanceof ServerVersionProvider || $ this -> conn instanceof ServerInfoAwareConnection ) {
425
+ return $ this ->serverVersion = $ this -> conn ->getServerVersion ();
426
426
}
427
427
428
428
// The condition should be removed once support for DBAL <3.3 is dropped
429
429
$ conn = method_exists ($ this ->conn , 'getNativeConnection ' ) ? $ this ->conn ->getNativeConnection () : $ this ->conn ->getWrappedConnection ();
430
- if ($ conn instanceof ServerInfoAwareConnection) {
431
- return $ this ->serverVersion = $ conn ->getServerVersion ();
432
- }
433
430
434
- return $ this ->serverVersion = ' 0 ' ;
431
+ return $ this ->serverVersion = $ conn -> getAttribute (\ PDO :: ATTR_SERVER_VERSION ) ;
435
432
}
436
433
437
434
private function addTableToSchema (Schema $ schema ): void
You can’t perform that action at this time.
0 commit comments