shlink/config/config.php

39 lines
1.3 KiB
PHP
Raw Normal View History

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);
namespace Shlinkio\Shlink;
2020-01-01 23:11:53 +03:00
use Laminas\ConfigAggregator;
2020-10-16 20:21:40 +03:00
use Laminas\Diactoros;
2020-01-01 23:11:53 +03:00
use Mezzio;
use Mezzio\ProblemDetails;
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([
2020-01-01 23:11:53 +03:00
Mezzio\ConfigProvider::class,
Mezzio\Router\ConfigProvider::class,
Mezzio\Router\FastRouteRouter\ConfigProvider::class,
Mezzio\Plates\ConfigProvider::class,
Mezzio\Swoole\ConfigProvider::class,
ProblemDetails\ConfigProvider::class,
2020-10-16 20:21:40 +03:00
Diactoros\ConfigProvider::class,
Common\ConfigProvider::class,
Config\ConfigProvider::class,
Importer\ConfigProvider::class,
IpGeolocation\ConfigProvider::class,
EventDispatcher\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ConfigAggregator\PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
env('APP_ENV') === 'test'
? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
2020-01-01 23:11:53 +03:00
: new ConfigAggregator\LaminasConfigProvider('config/params/{generated_config.php,*.config.{php,json}}'),
], 'data/cache/app_config.php', [
Core\Config\SimplifiedConfigParser::class,
Core\Config\BasePathPrefixer::class,
Core\Config\DeprecatedConfigParser::class,
]))->getMergedConfig();