Skip to content

Commit 8a2e0ab

Browse files
committed
[TASK] Update to Doctrine 4.x API
Keep using Doctrine 3.x API though. See https://github.com/doctrine/dbal/blob/4.0.0/UPGRADE.md
1 parent 04f8101 commit 8a2e0ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Classes/EventListeners/AlterTableDefinitionStatementsEventListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ public function __construct(private readonly Connection $connection) {}
1515

1616
public function addPhinxMigrationTableSchema(AlterTableDefinitionStatementsEvent $event): void
1717
{
18-
$schemaManager = $this->connection->getSchemaManager();
18+
$schemaManager = $this->connection->createSchemaManager();
1919

20-
if (!$schemaManager->tablesExist(PhinxConfiguration::MIGRATION_TABLE_NAME)) {
20+
if (!$schemaManager->tablesExist([PhinxConfiguration::MIGRATION_TABLE_NAME])) {
2121
return;
2222
}
2323

24-
$table = $schemaManager->listTableDetails(PhinxConfiguration::MIGRATION_TABLE_NAME);
24+
$table = $schemaManager->introspectTable(PhinxConfiguration::MIGRATION_TABLE_NAME);
2525
$schemaTableSQL = $this->buildSchemaTableSQL($this->removeColumnCollations($table));
2626

2727
$event->addSqlData($schemaTableSQL);

0 commit comments

Comments
 (0)