#827 Fixed swoole config getting loaded on non-swoole contexts when running CLI command first

This commit is contained in:
Alejandro Celaya 2020-11-22 10:24:06 +01:00
parent e4b00e832a
commit 6259c73b33
2 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,9 @@ use Laminas\ConfigAggregator\ConfigAggregator;
return [ return [
'debug' => false, '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',
]; ];

View File

@ -99,8 +99,6 @@ $helper = new class {
return [ return [
'config_cache_enabled' => false,
'app_options' => [ 'app_options' => [
'disable_track_param' => env('DISABLE_TRACK_PARAM'), 'disable_track_param' => env('DISABLE_TRACK_PARAM'),
], ],