From 46a7b7746fc529d4a3ed36ea569ecca61e428443 Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Mon, 7 Oct 2024 15:52:14 +0200 Subject: [PATCH 1/2] BUGFIX: Fix doctrine/dbal v3 compatibility Fixes: #321 --- Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php b/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php index f51f5c6..f418a45 100644 --- a/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php +++ b/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php @@ -251,7 +251,7 @@ public function getStatus(): Result $result->addNotice(new Notice((string)$this->connection->getParams()['host'], null, [], 'Host')); $result->addNotice(new Notice((string)$this->connection->getParams()['port'], null, [], 'Port')); $result->addNotice(new Notice((string)$this->connection->getDatabase(), null, [], 'Database')); - $result->addNotice(new Notice((string)$this->connection->getDriver()->getName(), null, [], 'Driver')); + $result->addNotice(new Notice((string)$this->connection->getDatabasePlatform()?->getName(), null, [], 'Platform')); $result->addNotice(new Notice((string)$this->connection->getParams()['user'], null, [], 'Username')); if ($tableExists) { $result->addNotice(new Notice('%s (exists)', null, [$this->eventTableName], 'Table')); From d9a2fca4972c4fa70267f414d0d2eff16074dd6b Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Tue, 8 Oct 2024 19:53:49 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php b/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php index f418a45..8199cc8 100644 --- a/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php +++ b/Classes/EventStore/Storage/Doctrine/DoctrineEventStorage.php @@ -249,9 +249,9 @@ public function getStatus(): Result return $result; } $result->addNotice(new Notice((string)$this->connection->getParams()['host'], null, [], 'Host')); - $result->addNotice(new Notice((string)$this->connection->getParams()['port'], null, [], 'Port')); + $result->addNotice(new Notice((string)($this->connection->getParams()['port'] ?? 'default'), null, [], 'Port')); $result->addNotice(new Notice((string)$this->connection->getDatabase(), null, [], 'Database')); - $result->addNotice(new Notice((string)$this->connection->getDatabasePlatform()?->getName(), null, [], 'Platform')); + $result->addNotice(new Notice((string)($this->connection->getParams()['driver'] ?? '?'), null, [], 'Driver')); $result->addNotice(new Notice((string)$this->connection->getParams()['user'], null, [], 'Username')); if ($tableExists) { $result->addNotice(new Notice('%s (exists)', null, [$this->eventTableName], 'Table'));