From 2e58f6d104a328268b305bc285b8cad2010e9378 Mon Sep 17 00:00:00 2001 From: bidi47 Date: Tue, 17 Nov 2026 17:11:39 +0200 Subject: [PATCH 1/5] updated config - doctrine cache Signed-off-by: bidi47 --- config/autoload/local.php.dist | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 77c497d..2cce574 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -4,6 +4,13 @@ declare(strict_types=1); $baseUrl = 'http://localhost:8080'; +/** + * Doctrine ORM second-level cache. + * Starting with doctrine/orm 3.8, the second-level cache requires the doctrine/orm-plugin-second-level-cache package. + * To enable it, run `composer require doctrine/orm-plugin-second-level-cache` and set this flag to true. + */ +$enableSecondLevelCache = false; + $databases = [ /** * You can add more database connections to this array. @@ -53,6 +60,13 @@ return [ // 'params' => $databases['postgresql'], ], ], + 'configuration' => [ + 'orm_default' => [ + 'second_level_cache' => [ + 'enabled' => $enableSecondLevelCache, + ], + ], + ], ], 'uploads' => [ 'user' => [ From e3ebcfcbe86ff1730432caf03dc3bdd852ebcbe3 Mon Sep 17 00:00:00 2001 From: bidi47 Date: Tue, 17 Nov 2026 17:14:54 +0200 Subject: [PATCH 2/5] linting fix Signed-off-by: bidi47 --- config/autoload/local.php.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 2cce574..c589ae8 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -54,7 +54,7 @@ return [ ], 'databases' => $databases, 'doctrine' => [ - 'connection' => [ + 'connection' => [ 'orm_default' => [ 'params' => $databases['mariadb'], // 'params' => $databases['postgresql'], From 0416684e63e22a18d7d12f466093e0684b69ea9b Mon Sep 17 00:00:00 2001 From: bidi47 Date: Tue, 17 Nov 2026 17:42:39 +0200 Subject: [PATCH 3/5] update based on review Signed-off-by: bidi47 --- config/autoload/local.php.dist | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index c589ae8..da8963f 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -4,13 +4,6 @@ declare(strict_types=1); $baseUrl = 'http://localhost:8080'; -/** - * Doctrine ORM second-level cache. - * Starting with doctrine/orm 3.8, the second-level cache requires the doctrine/orm-plugin-second-level-cache package. - * To enable it, run `composer require doctrine/orm-plugin-second-level-cache` and set this flag to true. - */ -$enableSecondLevelCache = false; - $databases = [ /** * You can add more database connections to this array. @@ -62,8 +55,12 @@ return [ ], 'configuration' => [ 'orm_default' => [ + /** + * Starting with doctrine/orm 3.8, the second-level cache requires the doctrine/orm-plugin-second-level-cache package. + * To enable it, run `composer require doctrine/orm-plugin-second-level-cache` and set 'enabled' to true. + */ 'second_level_cache' => [ - 'enabled' => $enableSecondLevelCache, + 'enabled' => false, ], ], ], From d2457d501f69e02b28ca8663b20a531abf58f7bb Mon Sep 17 00:00:00 2001 From: bidi47 Date: Tue, 17 Nov 2026 18:39:11 +0200 Subject: [PATCH 4/5] linting fix Signed-off-by: bidi47 --- config/autoload/local.php.dist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index da8963f..d6126d7 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -56,8 +56,10 @@ return [ 'configuration' => [ 'orm_default' => [ /** - * Starting with doctrine/orm 3.8, the second-level cache requires the doctrine/orm-plugin-second-level-cache package. - * To enable it, run `composer require doctrine/orm-plugin-second-level-cache` and set 'enabled' to true. + * Starting with doctrine/orm 3.8, the second-level cache requires + * the doctrine/orm-plugin-second-level-cache package. + * To enable it, run `composer require doctrine/orm-plugin-second-level-cache` + * and set 'enabled' to true. */ 'second_level_cache' => [ 'enabled' => false, From deea42e9081a7f63699d10a87a2fec066a84fd6a Mon Sep 17 00:00:00 2001 From: bidi47 Date: Wed, 18 Nov 2026 12:06:48 +0200 Subject: [PATCH 5/5] updated config - added persistent connection parameter Signed-off-by: bidi47 --- config/autoload/local.php.dist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index d6126d7..49715f9 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -10,6 +10,7 @@ $databases = [ * Only one active connection is allowed at a time. * By default, the application uses the 'mariadb' connection. * You can switch to another connection by activating it under doctrine->connection->orm_default-->params. + * Set 'persistent' to true to reuse database connections across requests (supported by pdo_mysql and pdo_pgsql). */ 'mariadb' => [ 'host' => 'localhost', @@ -18,6 +19,7 @@ $databases = [ 'password' => '', 'port' => 3306, 'driver' => 'pdo_mysql', + 'persistent' => false, 'collation' => 'utf8mb4_general_ci', 'table_prefix' => '', ], @@ -28,6 +30,7 @@ $databases = [ 'password' => '', 'port' => 5432, 'driver' => 'pdo_pgsql', + 'persistent' => false, 'collation' => 'utf8mb4_general_ci', 'table_prefix' => '', ],