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
421421 return $ this ->serverVersion ;
422422 }
423423
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 ();
426426 }
427427
428428 // The condition should be removed once support for DBAL <3.3 is dropped
429429 $ conn = method_exists ($ this ->conn , 'getNativeConnection ' ) ? $ this ->conn ->getNativeConnection () : $ this ->conn ->getWrappedConnection ();
430- if ($ conn instanceof ServerInfoAwareConnection) {
431- return $ this ->serverVersion = $ conn ->getServerVersion ();
432- }
433430
434- return $ this ->serverVersion = ' 0 ' ;
431+ return $ this ->serverVersion = $ conn -> getAttribute (\ PDO :: ATTR_SERVER_VERSION ) ;
435432 }
436433
437434 private function addTableToSchema (Schema $ schema ): void
You can’t perform that action at this time.
0 commit comments