Improved main config file and fixed tests whitelist

This commit is contained in:
Alejandro Celaya 2016-07-19 23:35:47 +02:00
parent aaf4f1dfe5
commit 31af0eea04
2 changed files with 11 additions and 12 deletions

View File

@ -15,14 +15,10 @@ use Zend\Expressive\ConfigManager\ZendConfigProvider;
* Obviously, if you use closures in your config you can't cache it.
*/
return call_user_func(function () {
$configManager = new ConfigManager([
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();
});
return (new ConfigManager([
Common\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
], 'data/cache/app_config.php'))->getMergedConfig();

View File

@ -16,7 +16,10 @@
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
<directory suffix=".php">./module/Common/src</directory>
<directory suffix=".php">./module/Core/src</directory>
<directory suffix=".php">./module/Rest/src</directory>
<directory suffix=".php">./module/CLI/src</directory>
</whitelist>
</filter>
</phpunit>