Added custom config params to merged confg

This commit is contained in:
Alejandro Celaya 2016-08-14 18:15:10 +02:00
parent fe708333b1
commit 9a42d70604

View File

@ -4,8 +4,7 @@ use Shlinkio\Shlink\CLI;
use Shlinkio\Shlink\Common;
use Shlinkio\Shlink\Core;
use Shlinkio\Shlink\Rest;
use Zend\Expressive\ConfigManager\ConfigManager;
use Zend\Expressive\ConfigManager\ZendConfigProvider;
use Zend\Expressive\ConfigManager;
/**
* Configuration files are loaded in a specific order. First ``global.php``, then ``*.global.php``.
@ -16,11 +15,12 @@ use Zend\Expressive\ConfigManager\ZendConfigProvider;
* Obviously, if you use closures in your config you can't cache it.
*/
return (new ConfigManager([
return (new ConfigManager\ConfigManager([
ErrorHandlerProvider::class,
Common\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
new ConfigManager\ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
new ConfigManager\PhpFileProvider('config/params/generated_config.php'),
], 'data/cache/app_config.php'))->getMergedConfig();