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);
|
|
|
|
|
2018-09-29 02:52:32 -05:00
|
|
|
namespace Shlinkio\Shlink;
|
|
|
|
|
2020-01-01 14:11:53 -06:00
|
|
|
use Laminas\ConfigAggregator;
|
2020-10-16 12:21:40 -05:00
|
|
|
use Laminas\Diactoros;
|
2020-01-01 14:11:53 -06:00
|
|
|
use Mezzio;
|
|
|
|
use Mezzio\ProblemDetails;
|
2019-07-19 12:54:39 -05:00
|
|
|
|
2019-01-26 02:09:49 -06:00
|
|
|
use function Shlinkio\Shlink\Common\env;
|
2016-04-10 02:38:07 -05:00
|
|
|
|
2017-03-24 14:34:18 -05:00
|
|
|
return (new ConfigAggregator\ConfigAggregator([
|
2020-01-01 14:11:53 -06:00
|
|
|
Mezzio\ConfigProvider::class,
|
|
|
|
Mezzio\Router\ConfigProvider::class,
|
|
|
|
Mezzio\Router\FastRouteRouter\ConfigProvider::class,
|
|
|
|
Mezzio\Plates\ConfigProvider::class,
|
|
|
|
Mezzio\Swoole\ConfigProvider::class,
|
2019-11-22 12:49:14 -06:00
|
|
|
ProblemDetails\ConfigProvider::class,
|
2020-10-16 12:21:40 -05:00
|
|
|
Diactoros\ConfigProvider::class,
|
2016-07-19 16:35:47 -05:00
|
|
|
Common\ConfigProvider::class,
|
2020-03-14 13:24:21 -05:00
|
|
|
Config\ConfigProvider::class,
|
2019-08-10 06:42:37 -05:00
|
|
|
IpGeolocation\ConfigProvider::class,
|
2020-03-14 13:24:21 -05:00
|
|
|
EventDispatcher\ConfigProvider::class,
|
2016-07-19 16:35:47 -05:00
|
|
|
Core\ConfigProvider::class,
|
|
|
|
CLI\ConfigProvider::class,
|
|
|
|
Rest\ConfigProvider::class,
|
2018-12-07 13:42:58 -06:00
|
|
|
new ConfigAggregator\PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
|
2019-01-26 02:09:49 -06:00
|
|
|
env('APP_ENV') === 'test'
|
|
|
|
? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
|
2020-01-01 14:11:53 -06:00
|
|
|
: new ConfigAggregator\LaminasConfigProvider('config/params/{generated_config.php,*.config.{php,json}}'),
|
2019-04-18 03:37:38 -05:00
|
|
|
], 'data/cache/app_config.php', [
|
2019-09-13 13:03:53 -05:00
|
|
|
Core\Config\SimplifiedConfigParser::class,
|
|
|
|
Core\Config\BasePathPrefixer::class,
|
2019-11-02 05:30:09 -05:00
|
|
|
Core\Config\DeprecatedConfigParser::class,
|
2019-04-18 03:37:38 -05:00
|
|
|
]))->getMergedConfig();
|