Skip to content

Commit 76df983

Browse files
bug #58956 [DoctrineBridge] Fix Connection::createSchemaManager() for Doctrine DBAL v2 (neodevcode)
This PR was merged into the 6.4 branch. Discussion ---------- [DoctrineBridge] Fix `Connection::createSchemaManager()` for Doctrine DBAL v2 | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58955 | License | MIT As the 6.4 symfony/doctrine-bridge is compatible with doctrine/dbal 2.13 we need to check for createSchemaManager existance and use getSchemaManager instead if necessary (like it's already done in the messenger component for instance) Commits ------- b8a8bd8 [DoctrineBridge] Fix Connection::createSchemaManager() for Doctrine DBAL v2
2 parents 7c72213 + b8a8bd8 commit 76df983

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Bridge/Doctrine/SchemaListener/AbstractSchemaListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ abstract public function postGenerateSchema(GenerateSchemaEventArgs $event): voi
2424
protected function getIsSameDatabaseChecker(Connection $connection): \Closure
2525
{
2626
return static function (\Closure $exec) use ($connection): bool {
27-
$schemaManager = $connection->createSchemaManager();
28-
27+
$schemaManager = method_exists($connection, 'createSchemaManager') ? $connection->createSchemaManager() : $connection->getSchemaManager();
2928
$checkTable = 'schema_subscriber_check_'.bin2hex(random_bytes(7));
3029
$table = new Table($checkTable);
3130
$table->addColumn('id', Types::INTEGER)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy