From a957f66ed080f4511ba49cd88c854efa8e9fcca7 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 31 Jul 2016 16:30:05 +0200 Subject: [PATCH] Renamed services first level config key to dependencies --- config/autoload/errorhandler.local.php.dist | 2 +- config/autoload/services.global.php | 2 +- config/container.php | 2 +- module/CLI/config/services.config.php | 2 +- module/CLI/test/ConfigProviderTest.php | 2 +- module/Common/config/services.config.php | 2 +- module/Common/test/ConfigProviderTest.php | 2 +- module/Core/config/services.config.php | 2 +- module/Core/test/ConfigProviderTest.php | 2 +- module/Rest/config/services.config.php | 2 +- module/Rest/test/ConfigProviderTest.php | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/autoload/errorhandler.local.php.dist b/config/autoload/errorhandler.local.php.dist index afbc52ed..7e361e0a 100644 --- a/config/autoload/errorhandler.local.php.dist +++ b/config/autoload/errorhandler.local.php.dist @@ -3,7 +3,7 @@ use Shlinkio\Shlink\Common\ErrorHandler\ContentBasedErrorHandler; use Zend\Expressive\Container\WhoopsErrorHandlerFactory; return [ - 'services' => [ + 'dependencies' => [ 'invokables' => [ 'Zend\Expressive\Whoops' => Whoops\Run::class, 'Zend\Expressive\WhoopsPageHandler' => Whoops\Handler\PrettyPageHandler::class, diff --git a/config/autoload/services.global.php b/config/autoload/services.global.php index 44bbbbdd..c0c5c46a 100644 --- a/config/autoload/services.global.php +++ b/config/autoload/services.global.php @@ -10,7 +10,7 @@ use Zend\ServiceManager\Factory\InvokableFactory; return [ - 'services' => [ + 'dependencies' => [ 'factories' => [ Expressive\Application::class => Container\ApplicationFactory::class, diff --git a/config/container.php b/config/container.php index 5678edcb..cbc84db5 100644 --- a/config/container.php +++ b/config/container.php @@ -16,6 +16,6 @@ if (class_exists(Dotenv::class)) { // Build container $config = require __DIR__ . '/config.php'; -$container = new ServiceManager($config['services']); +$container = new ServiceManager($config['dependencies']); $container->setService('config', $config); return $container; diff --git a/module/CLI/config/services.config.php b/module/CLI/config/services.config.php index 5c5931a4..86398cf4 100644 --- a/module/CLI/config/services.config.php +++ b/module/CLI/config/services.config.php @@ -5,7 +5,7 @@ use Symfony\Component\Console; return [ - 'services' => [ + 'dependencies' => [ 'factories' => [ Console\Application::class => CLI\Factory\ApplicationFactory::class, diff --git a/module/CLI/test/ConfigProviderTest.php b/module/CLI/test/ConfigProviderTest.php index 8d368561..6231752a 100644 --- a/module/CLI/test/ConfigProviderTest.php +++ b/module/CLI/test/ConfigProviderTest.php @@ -24,7 +24,7 @@ class ConfigProviderTest extends TestCase $config = $this->configProvider->__invoke(); $this->assertArrayHasKey('cli', $config); - $this->assertArrayHasKey('services', $config); + $this->assertArrayHasKey('dependencies', $config); $this->assertArrayHasKey('translator', $config); } } diff --git a/module/Common/config/services.config.php b/module/Common/config/services.config.php index be062b86..bcd30faa 100644 --- a/module/Common/config/services.config.php +++ b/module/Common/config/services.config.php @@ -14,7 +14,7 @@ use Zend\ServiceManager\Factory\InvokableFactory; return [ - 'services' => [ + 'dependencies' => [ 'factories' => [ EntityManager::class => EntityManagerFactory::class, GuzzleHttp\Client::class => InvokableFactory::class, diff --git a/module/Common/test/ConfigProviderTest.php b/module/Common/test/ConfigProviderTest.php index 54c8c65f..dd7723df 100644 --- a/module/Common/test/ConfigProviderTest.php +++ b/module/Common/test/ConfigProviderTest.php @@ -25,7 +25,7 @@ class ConfigProviderTest extends TestCase $this->assertArrayHasKey('error_handler', $config); $this->assertArrayHasKey('middleware_pipeline', $config); - $this->assertArrayHasKey('services', $config); + $this->assertArrayHasKey('dependencies', $config); $this->assertArrayHasKey('twig', $config); } } diff --git a/module/Core/config/services.config.php b/module/Core/config/services.config.php index 7d044875..9bcacbfa 100644 --- a/module/Core/config/services.config.php +++ b/module/Core/config/services.config.php @@ -5,7 +5,7 @@ use Shlinkio\Shlink\Core\Service; return [ - 'services' => [ + 'dependencies' => [ 'factories' => [ // Services Service\UrlShortener::class => AnnotatedFactory::class, diff --git a/module/Core/test/ConfigProviderTest.php b/module/Core/test/ConfigProviderTest.php index fdd41cad..3af8a48a 100644 --- a/module/Core/test/ConfigProviderTest.php +++ b/module/Core/test/ConfigProviderTest.php @@ -24,7 +24,7 @@ class ConfigProviderTest extends TestCase $config = $this->configProvider->__invoke(); $this->assertArrayHasKey('routes', $config); - $this->assertArrayHasKey('services', $config); + $this->assertArrayHasKey('dependencies', $config); $this->assertArrayHasKey('templates', $config); $this->assertArrayHasKey('translator', $config); $this->assertArrayHasKey('zend-expressive', $config); diff --git a/module/Rest/config/services.config.php b/module/Rest/config/services.config.php index 551c4c96..e04c8ba0 100644 --- a/module/Rest/config/services.config.php +++ b/module/Rest/config/services.config.php @@ -7,7 +7,7 @@ use Zend\ServiceManager\Factory\InvokableFactory; return [ - 'services' => [ + 'dependencies' => [ 'factories' => [ Service\RestTokenService::class => AnnotatedFactory::class, diff --git a/module/Rest/test/ConfigProviderTest.php b/module/Rest/test/ConfigProviderTest.php index 377c845f..6801a82b 100644 --- a/module/Rest/test/ConfigProviderTest.php +++ b/module/Rest/test/ConfigProviderTest.php @@ -27,7 +27,7 @@ class ConfigProviderTest extends TestCase $this->assertArrayHasKey('middleware_pipeline', $config); $this->assertArrayHasKey('rest', $config); $this->assertArrayHasKey('routes', $config); - $this->assertArrayHasKey('services', $config); + $this->assertArrayHasKey('dependencies', $config); $this->assertArrayHasKey('translator', $config); } }