2016-04-10 02:38:07 -05:00
|
|
|
<?php
|
2019-10-05 10:26:10 -05:00
|
|
|
|
2017-10-12 03:13:20 -05:00
|
|
|
declare(strict_types=1);
|
2016-04-10 02:38:07 -05:00
|
|
|
|
2020-01-01 14:11:53 -06:00
|
|
|
use Laminas\ConfigAggregator\ConfigAggregator;
|
2024-10-23 03:53:09 -05:00
|
|
|
use Shlinkio\Shlink\Core\Config\EnvVars;
|
2018-11-18 09:02:52 -06:00
|
|
|
|
2024-10-23 03:53:09 -05:00
|
|
|
return (function () {
|
|
|
|
$isDev = EnvVars::isDevEnv();
|
2016-04-10 02:38:07 -05:00
|
|
|
|
2024-10-23 03:53:09 -05:00
|
|
|
return [
|
2020-11-22 03:24:06 -06:00
|
|
|
|
2024-10-23 03:53:09 -05:00
|
|
|
'debug' => $isDev,
|
2016-04-10 02:38:07 -05:00
|
|
|
|
2024-10-23 03:53:09 -05: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',
|
|
|
|
|
|
|
|
];
|
|
|
|
})();
|