diff --git a/index.php b/index.php index 71130a3c..f8f74c0a 100755 --- a/index.php +++ b/index.php @@ -33,8 +33,7 @@ define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd())); */ define('PATH', [ 'project' => ROOT_DIR . '/project', - 'cache' => ROOT_DIR . '/var/cache', - 'logs' => ROOT_DIR . '/var/logs', + 'tmp' => ROOT_DIR . '/var/tmp', ]); /** diff --git a/src/flextype/dependencies.php b/src/flextype/dependencies.php index e75f9f15..261b884c 100644 --- a/src/flextype/dependencies.php +++ b/src/flextype/dependencies.php @@ -124,7 +124,7 @@ flextype()->container()['cache'] = static function () { foreach (flextype('registry')->get('flextype.settings.cache.drivers.'. $driver_name) as $key => $value) { if ($key == 'path' && in_array($driver_name, ['files', 'sqlite', 'leveldb'])) { - $config['path'] = (!empty($value)) ? ROOT_DIR . '/var/tmp/' . $value : sys_get_temp_dir(); + $config['path'] = (!empty($value)) ? PATH['tmp'] . '/' . $value : sys_get_temp_dir(); } else { $config[Strings::camel($key)] = $value; } @@ -257,7 +257,7 @@ flextype()->container()['images'] = static function () { // Set cache filesystem $cache = new Filesystem( - new Local(ROOT_DIR . '/var/tmp/glide') + new Local(PATH['tmp'] . '/glide') ); // Set watermarks filesystem diff --git a/src/flextype/preflight.php b/src/flextype/preflight.php index 31a42b56..d2a17ddf 100644 --- a/src/flextype/preflight.php +++ b/src/flextype/preflight.php @@ -8,7 +8,7 @@ use Symfony\Component\Yaml\Yaml as SymfonyYaml; $flextype_manifest_file_path = ROOT_DIR . '/src/flextype/flextype.yaml'; $default_flextype_settings_file_path = ROOT_DIR . '/src/flextype/settings.yaml'; $custom_flextype_settings_file_path = PATH['project'] . '/config/flextype/settings.yaml'; -$preflight_flextype_path = PATH['cache'] . '/preflight/flextype/'; +$preflight_flextype_path = PATH['tmp'] . '/preflight/flextype/'; $custom_flextype_settings_path = PATH['project'] . '/config/flextype/'; ! Filesystem::has($preflight_flextype_path) and Filesystem::createDir($preflight_flextype_path);