Skip to content

Commit

Permalink
fix: env loading and caching issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Aug 1, 2024
1 parent b7ce21c commit 5a866d0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ MONOLOG_DEFAULT_LEVEL=DEBUG

QUEUE_CONNECTION=in-memory

CACHE_STORAGE=rr-local
CACHE_STORAGE=roadrunner

STORAGE_DEFAULT=default

Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 6 additions & 11 deletions app/config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

declare(strict_types=1);

use Spiral\Cache\Storage\ArrayStorage;
use Spiral\Cache\Storage\FileStorage;

/**
Expand All @@ -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',
],
Expand Down
2 changes: 1 addition & 1 deletion app/pest.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<env name="DB_LOG_QUERY_PARAMETERS" value="true" />
<env name="CYCLE_SCHEMA_CACHE" value="true" />
<env name="QUEUE_CONNECTION" value="sync" />
<env name="CACHE_STORAGE" value="local" />
<env name="APP_ENV" value="testing" />
<env name="TOKENIZER_CACHE_TARGETS" value="true" />
<env name="TELEMETRY_DRIVER" value="null" />
<env name="BROADCAST_DRIVER" value="log" />
<env name="CACHE_STORAGE" value="file" />
</php>
</phpunit>
2 changes: 1 addition & 1 deletion app/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
<env name="DB_LOG_QUERY_PARAMETERS" value="true" />
<env name="CYCLE_SCHEMA_CACHE" value="true" />
<env name="QUEUE_CONNECTION" value="sync" />
<env name="CACHE_STORAGE" value="local" />
<env name="APP_ENV" value="testing" />
<env name="TOKENIZER_CACHE_TARGETS" value="true" />
<env name="TELEMETRY_DRIVER" value="null" />
<env name="BROADCAST_DRIVER" value="log" />
<env name="CACHE_STORAGE" value="file" />
</php>
</phpunit>
2 changes: 0 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a866d0

Please sign in to comment.