From 5e29a0a09e905b3874281e525d3df1d015502843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Wed, 2 Mar 2022 11:54:40 +0100 Subject: [PATCH] Merge Compatibility fix --- src/DatabaseExtension.php | 1 + src/Orm/DI/OrmExtension.php | 2 +- src/Orm/EntityManagerDecorator.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DatabaseExtension.php b/src/DatabaseExtension.php index bb8f1cd..5b0d555 100644 --- a/src/DatabaseExtension.php +++ b/src/DatabaseExtension.php @@ -93,6 +93,7 @@ public function getConfigSchema(): Schema 'types' => Expect::array(), 'typesMapping' => Expect::array(), 'wrapperClass' => Expect::string()->nullable(), + 'serverVersion' => Expect::string()->nullable(), ])->castTo('array')->required(), 'configuration' => Expect::structure([ 'sqlLogger' => Expect::string()->nullable(), diff --git a/src/Orm/DI/OrmExtension.php b/src/Orm/DI/OrmExtension.php index 7606dcc..5deaf60 100644 --- a/src/Orm/DI/OrmExtension.php +++ b/src/Orm/DI/OrmExtension.php @@ -61,7 +61,7 @@ public function loadConfiguration(): void public function loadDoctrineConfiguration(): void { $builder = $this->getContainerBuilder(); - $config = $this->defaults['configuration'] + $this->config; + $config = array_replace($this->defaults['configuration'], $this->config); $config = Helpers::expand($config, $builder->parameters); $configurationClass = $config['configurationClass'] ?? Configuration::class; diff --git a/src/Orm/EntityManagerDecorator.php b/src/Orm/EntityManagerDecorator.php index b781ef5..7f315b3 100644 --- a/src/Orm/EntityManagerDecorator.php +++ b/src/Orm/EntityManagerDecorator.php @@ -9,7 +9,7 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Repository\RepositoryFactory; -final class EntityManagerDecorator extends DoctrineEntityManagerDecorator +class EntityManagerDecorator extends DoctrineEntityManagerDecorator { private RepositoryFactory $repositoryFactory;