Files

18 lines
502 B
PHP
Raw Permalink Normal View History

2016-04-10 09:38:07 +02:00
<?php
2019-10-05 17:26:10 +02:00
2017-10-12 10:13:20 +02:00
declare(strict_types=1);
2016-04-10 09:38:07 +02:00
2020-01-01 21:11:53 +01:00
use Laminas\ConfigAggregator\ConfigAggregator;
2024-10-23 10:53:09 +02:00
use Shlinkio\Shlink\Core\Config\EnvVars;
2018-11-18 16:02:52 +01:00
2024-10-23 10:53:09 +02:00
return (function () {
$isDev = EnvVars::isDevEnv();
2016-04-10 09:38:07 +02:00
2024-10-23 10:53:09 +02:00
return [
'debug' => $isDev,
2016-04-10 09:38:07 +02:00
2024-10-23 10:53:09 +02:00
// Disabling config cache for cli, ensures it's never used for RoadRunner, and also that console
// commands don't generate a cache file that's then used by php-fpm web executions
ConfigAggregator::ENABLE_CACHE => !$isDev && PHP_SAPI !== 'cli',
2024-10-23 10:53:09 +02:00
];
})();