2016-04-10 09:38:07 +02:00
|
|
|
<?php
|
2017-10-12 10:13:20 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2018-09-29 09:52:32 +02:00
|
|
|
namespace Shlinkio\Shlink;
|
|
|
|
|
2016-08-14 21:28:21 +02:00
|
|
|
use Acelaya\ExpressiveErrorHandler;
|
2017-03-24 20:34:18 +01:00
|
|
|
use Zend\ConfigAggregator;
|
2018-03-26 18:49:28 +02:00
|
|
|
use Zend\Expressive;
|
2019-07-19 19:54:39 +02:00
|
|
|
|
2019-01-26 09:09:49 +01:00
|
|
|
use function Shlinkio\Shlink\Common\env;
|
2016-04-10 09:38:07 +02:00
|
|
|
|
2017-03-24 20:34:18 +01:00
|
|
|
return (new ConfigAggregator\ConfigAggregator([
|
2018-03-26 18:49:28 +02:00
|
|
|
Expressive\ConfigProvider::class,
|
|
|
|
Expressive\Router\ConfigProvider::class,
|
|
|
|
Expressive\Router\FastRouteRouter\ConfigProvider::class,
|
|
|
|
Expressive\Plates\ConfigProvider::class,
|
2018-11-24 08:43:48 +01:00
|
|
|
Expressive\Swoole\ConfigProvider::class,
|
2016-08-14 21:28:21 +02:00
|
|
|
ExpressiveErrorHandler\ConfigProvider::class,
|
2016-07-19 23:35:47 +02:00
|
|
|
Common\ConfigProvider::class,
|
|
|
|
Core\ConfigProvider::class,
|
|
|
|
CLI\ConfigProvider::class,
|
|
|
|
Rest\ConfigProvider::class,
|
2019-07-19 19:54:39 +02:00
|
|
|
EventDispatcher\ConfigProvider::class,
|
2018-12-07 20:42:58 +01:00
|
|
|
new ConfigAggregator\PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
|
2019-01-26 09:09:49 +01:00
|
|
|
env('APP_ENV') === 'test'
|
|
|
|
? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
|
2019-08-07 10:59:05 +02:00
|
|
|
: new ConfigAggregator\ZendConfigProvider('config/params/{generated_config.php,*.config.{php,json}}'),
|
2019-04-18 10:37:38 +02:00
|
|
|
], 'data/cache/app_config.php', [
|
|
|
|
Core\ConfigPostProcessor::class,
|
|
|
|
]))->getMergedConfig();
|