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