From 4f78a722f8fd841bfa5ffae151b5ee33d566171b Mon Sep 17 00:00:00 2001 From: MarioRadu Date: Fri, 12 Jul 2024 17:04:14 +0300 Subject: [PATCH 1/2] Removed unused config Signed-off-by: MarioRadu --- config/autoload/doctrine.global.php | 1 - config/autoload/local.php.dist | 1 - src/Admin/src/Repository/AdminRepository.php | 12 ------------ src/Admin/src/Service/AdminService.php | 3 --- 4 files changed, 17 deletions(-) diff --git a/config/autoload/doctrine.global.php b/config/autoload/doctrine.global.php index 53534e57..840f32e1 100644 --- a/config/autoload/doctrine.global.php +++ b/config/autoload/doctrine.global.php @@ -69,5 +69,4 @@ ], 'fixtures' => getcwd() . '/data/doctrine/fixtures', ], - 'resultCacheLifetime' => 300, ]; diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 274312b9..9935f62b 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -26,7 +26,6 @@ $databases = [ ]; return [ - 'annotations_cache_dir' => getcwd() . '/data/cache/annotations', 'application' => [ 'name' => $app['name'] ?? '', 'url' => $baseUrl, diff --git a/src/Admin/src/Repository/AdminRepository.php b/src/Admin/src/Repository/AdminRepository.php index 5b5fd4bf..dfd901a6 100644 --- a/src/Admin/src/Repository/AdminRepository.php +++ b/src/Admin/src/Repository/AdminRepository.php @@ -137,16 +137,4 @@ public function countAdminLogins(): mixed ->getQuery() ->getSingleScalarResult(); } - - public function getCacheLifetime(): int - { - return $this->cacheLifetime; - } - - public function setCacheLifetime(int $cacheLifetime): self - { - $this->cacheLifetime = $cacheLifetime; - - return $this; - } } diff --git a/src/Admin/src/Service/AdminService.php b/src/Admin/src/Service/AdminService.php index 36637133..37e147b2 100644 --- a/src/Admin/src/Service/AdminService.php +++ b/src/Admin/src/Service/AdminService.php @@ -29,15 +29,12 @@ class AdminService implements AdminServiceInterface LocationServiceInterface::class, AdminRepository::class, AdminRoleRepository::class, - "config.resultCacheLifetime" )] public function __construct( protected LocationServiceInterface $locationService, protected AdminRepository $adminRepository, protected AdminRoleRepository $adminRoleRepository, - int $cacheLifetime, ) { - $this->adminRepository->setCacheLifetime($cacheLifetime); } public function getAdminRepository(): AdminRepository|EntityRepository From 80c684ff3f74f7abdc554e2c16f7b960c83e38b1 Mon Sep 17 00:00:00 2001 From: MarioRadu Date: Fri, 12 Jul 2024 17:06:24 +0300 Subject: [PATCH 2/2] removed unused config Signed-off-by: MarioRadu --- config/autoload/doctrine.global.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/autoload/doctrine.global.php b/config/autoload/doctrine.global.php index 840f32e1..bcb15392 100644 --- a/config/autoload/doctrine.global.php +++ b/config/autoload/doctrine.global.php @@ -12,7 +12,7 @@ use Ramsey\Uuid\Doctrine\UuidType; return [ - 'doctrine' => [ + 'doctrine' => [ 'configuration' => [ 'orm_default' => [ 'entity_listener_resolver' => EntityListenerResolver::class,