From 5a866d0a2f8fa62c7c650c2b50148d918d6e1b59 Mon Sep 17 00:00:00 2001 From: lotyp Date: Fri, 2 Aug 2024 00:17:35 +0300 Subject: [PATCH] fix: env loading and caching issues --- .env.example | 2 +- .github/workflows/static-analysis.yml | 11 ----------- app/config/cache.php | 17 ++++++----------- app/pest.xml.dist | 2 +- app/phpunit.xml.dist | 2 +- docker-compose.yaml | 2 -- 6 files changed, 9 insertions(+), 27 deletions(-) diff --git a/.env.example b/.env.example index a026d61..684da0c 100644 --- a/.env.example +++ b/.env.example @@ -38,7 +38,7 @@ MONOLOG_DEFAULT_LEVEL=DEBUG QUEUE_CONNECTION=in-memory -CACHE_STORAGE=rr-local +CACHE_STORAGE=roadrunner STORAGE_DEFAULT=default diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4782544..a977625 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -5,17 +5,6 @@ on: # yamllint disable-line rule:truthy branches: - master - develop - paths: - - 'app/config/**' - - 'app/src/**' - - 'app/tests/**' - - 'app/.php-cs-fixer.dist.php' - - 'app/composer.json' - - 'app/composer.lock' - - 'app/phpstan.neon.dist' - - 'app/phpstan-baseline.neon' - - 'app/psalm.xml' - - 'app/psalm-baseline.xml' name: 🔍 Static analysis diff --git a/app/config/cache.php b/app/config/cache.php index 615b8ca..49a92ce 100644 --- a/app/config/cache.php +++ b/app/config/cache.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use Spiral\Cache\Storage\ArrayStorage; use Spiral\Cache\Storage\FileStorage; /** @@ -14,35 +13,31 @@ /* * The default cache connection that gets used while using this caching library. */ - 'default' => env('CACHE_STORAGE', 'rr-local'), + 'default' => env('CACHE_STORAGE', 'roadrunner'), /* * Aliases, if you want to use domain specific storages. */ 'aliases' => [ // 'user-data' => [ - // 'storage' => 'rr-local', + // 'storage' => 'roadrunner', // 'prefix' => 'user_' // ], - // 'blog-data' => 'rr-local', + // 'blog-data' => 'roadrunner', ], /* - * Here you may define all of the cache "storages" for your application as well as their types. + * Here you may define all the cache "storages" for your application as well as their types. */ 'storages' => [ - 'rr-local' => [ + 'roadrunner' => [ 'type' => 'roadrunner', 'driver' => 'local', ], - - 'local' => [ - // Alias for ArrayStorage type + 'array' => [ 'type' => 'array', ], - 'file' => [ - // Alias for FileStorage type 'type' => 'file', 'path' => directory('runtime') . 'Cache', ], diff --git a/app/pest.xml.dist b/app/pest.xml.dist index db1d89a..6fd8151 100644 --- a/app/pest.xml.dist +++ b/app/pest.xml.dist @@ -27,10 +27,10 @@ - + diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist index fbe2024..1d63c21 100644 --- a/app/phpunit.xml.dist +++ b/app/phpunit.xml.dist @@ -40,10 +40,10 @@ - + diff --git a/docker-compose.yaml b/docker-compose.yaml index 6da918d..545bc16 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -28,8 +28,6 @@ services: FAKETIME: '+2h' XDEBUG_MODE: '${XDEBUG_MODE:-off}' PHIVE_HOME: /app/.phive - env_file: - - .env dns: 8.8.8.8 command: /app/rr serve