Skip to content

Commit 495c46f

Browse files
committed
Make PhpFastCache compatible with its v8 latest version
1 parent 505c0ab commit 495c46f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

config.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Dotenv\Dotenv;
66
use Phpfastcache\CacheManager;
7+
use Phpfastcache\Config\ConfigurationOption;
78

89
$requiredEnvFields = [
910
'DB_HOST',
@@ -25,9 +26,13 @@
2526
];
2627

2728
// Setup cache config
28-
CacheManager::setDefaultConfig([
29-
'path' => dirname(__DIR__) . '/cache',
30-
]);
29+
CacheManager::setDefaultConfig(
30+
new ConfigurationOption(
31+
[
32+
'path' => dirname(__DIR__) . '/cache'
33+
]
34+
)
35+
);
3136

3237
$env = Dotenv::createImmutable(__DIR__);
3338
$env->load();

0 commit comments

Comments
 (0)