From 6259c73b33bcd6a42f106557d57fc4adc2da1bbd Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 22 Nov 2020 10:24:06 +0100 Subject: [PATCH] #827 Fixed swoole config getting loaded on non-swoole contexts when running CLI command first --- config/autoload/common.global.php | 5 ++++- docker/config/shlink_in_docker.local.php | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/autoload/common.global.php b/config/autoload/common.global.php index 4d8c3520..2bc4c2db 100644 --- a/config/autoload/common.global.php +++ b/config/autoload/common.global.php @@ -7,6 +7,9 @@ use Laminas\ConfigAggregator\ConfigAggregator; return [ 'debug' => false, - ConfigAggregator::ENABLE_CACHE => true, + + // Disabling config cache for cli, ensures it's never used for swoole and also that console commands don't generate + // a cache file that's then used by non-swoole web executions + ConfigAggregator::ENABLE_CACHE => PHP_SAPI !== 'cli', ]; diff --git a/docker/config/shlink_in_docker.local.php b/docker/config/shlink_in_docker.local.php index 8efee8a4..c4502b7c 100644 --- a/docker/config/shlink_in_docker.local.php +++ b/docker/config/shlink_in_docker.local.php @@ -99,8 +99,6 @@ $helper = new class { return [ - 'config_cache_enabled' => false, - 'app_options' => [ 'disable_track_param' => env('DISABLE_TRACK_PARAM'), ],