Improved config loading so that autoloaded overrides module-specific

This commit is contained in:
Alejandro Celaya 2016-07-19 23:30:23 +02:00
parent e28e984278
commit aaf4f1dfe5
2 changed files with 3 additions and 2 deletions

View file

@ -1,2 +1,3 @@
# url-shortener
# Shlink
A PHP-based URL shortener application with analytics and management

View file

@ -17,11 +17,11 @@ use Zend\Expressive\ConfigManager\ZendConfigProvider;
return call_user_func(function () {
$configManager = new ConfigManager([
new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
Common\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
], 'data/cache/app_config.php');
return $configManager->getMergedConfig();