shlink/config/config.php

29 lines
1 KiB
PHP
Raw Normal View History

2016-04-10 10:38:07 +03:00
<?php
2017-10-12 11:13:20 +03:00
declare(strict_types=1);
namespace Shlinkio\Shlink;
2016-08-14 22:28:21 +03:00
use Acelaya\ExpressiveErrorHandler;
2017-03-24 22:34:18 +03:00
use Zend\ConfigAggregator;
2018-03-26 19:49:28 +03:00
use Zend\Expressive;
use function Shlinkio\Shlink\Common\env;
2016-04-10 10:38:07 +03:00
2017-03-24 22:34:18 +03:00
return (new ConfigAggregator\ConfigAggregator([
2018-03-26 19:49:28 +03:00
Expressive\ConfigProvider::class,
Expressive\Router\ConfigProvider::class,
Expressive\Router\FastRouteRouter\ConfigProvider::class,
Expressive\Plates\ConfigProvider::class,
Expressive\Swoole\ConfigProvider::class,
2016-08-14 22:28:21 +03:00
ExpressiveErrorHandler\ConfigProvider::class,
Common\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ConfigAggregator\PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
new ConfigAggregator\ZendConfigProvider('config/params/{generated_config.php,*.config.{php,json}}'),
env('APP_ENV') === 'test'
? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
: new ConfigAggregator\ArrayProvider([]),
], 'data/cache/app_config.php'))->getMergedConfig();