From 1785398ea5924501844129d89165ee659e91ffe7 Mon Sep 17 00:00:00 2001 From: Eric Braun Date: Fri, 17 Feb 2017 18:36:57 +0100 Subject: [PATCH] ignore charset connection value on postgre --- src/Container/AbstractEventStoreFactory.php | 4 +++- src/Container/PostgresEventStoreFactory.php | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Container/AbstractEventStoreFactory.php b/src/Container/AbstractEventStoreFactory.php index fcd03bb3..bc4d57f3 100644 --- a/src/Container/AbstractEventStoreFactory.php +++ b/src/Container/AbstractEventStoreFactory.php @@ -99,7 +99,9 @@ public function __invoke(ContainerInterface $container): EventStore $dsn .= 'host=' . $config['connection_options']['host'] . $separator; $dsn .= 'port=' . $config['connection_options']['port'] . $separator; $dsn .= 'dbname=' . $config['connection_options']['dbname'] . $separator; - $dsn .= 'charset=' . $config['connection_options']['charset'] . $separator; + if (isset($config['connection_options']['charset'])) { + $dsn .= 'charset=' . $config['connection_options']['charset'] . $separator; + } $dsn = rtrim($dsn); $user = $config['connection_options']['user']; $password = $config['connection_options']['password']; diff --git a/src/Container/PostgresEventStoreFactory.php b/src/Container/PostgresEventStoreFactory.php index e6c84aba..198688d5 100644 --- a/src/Container/PostgresEventStoreFactory.php +++ b/src/Container/PostgresEventStoreFactory.php @@ -59,7 +59,6 @@ public function defaultOptions(): iterable 'host' => '127.0.0.1', 'dbname' => 'event_store', 'port' => 5432, - 'charset' => 'utf8', ], 'load_batch_size' => 1000, 'event_streams_table' => 'event_streams',