diff --git a/composer.json b/composer.json index c396e48..4125799 100644 --- a/composer.json +++ b/composer.json @@ -33,28 +33,28 @@ "require": { "php": "^5.5 || ^7.0", "aura/router" : "^2.3", - "doctrine/dbal": "^2.5", - "doctrine/migrations": "^1.0", + "doctrine/dbal": "^2.5.4", + "doctrine/migrations": "^1.4.1", "nicolopignatelli/valueobjects": "^3.0", "prooph/event-sourcing" : "^4.0", - "prooph/event-store" : "^6.0", + "prooph/event-store" : "^6.3", "prooph/event-store-bus-bridge" : "^2.0", - "prooph/psr7-middleware": "^0.1", - "prooph/service-bus" : "^5.0", + "prooph/psr7-middleware": "^0.3", + "prooph/service-bus" : "^5.1", "roave/security-advisories": "dev-master", "sandrokeil/interop-config": "^1.0", "zendframework/zend-config": "^2.6", "zendframework/zend-expressive" : "^1.0", "zendframework/zend-expressive-aurarouter": "^1.0", "zendframework/zend-expressive-helpers": "^2.0", - "zendframework/zend-expressive-zendviewrenderer": "^1.0.1", - "zendframework/zend-filter": "^2.6", - "zendframework/zend-servicemanager" : "^2.7.5 || ^3.0.3", - "zendframework/zend-stdlib": "^2.7", - "zendframework/zend-mail": "^2.6" + "zendframework/zend-expressive-zendviewrenderer": "^1.1.0", + "zendframework/zend-filter": "^2.7.1", + "zendframework/zend-servicemanager" : "^3.0.3", + "zendframework/zend-stdlib": "^3.0.1", + "zendframework/zend-mail": "^2.7.1" }, "require-dev" : { - "fabpot/php-cs-fixer": "^1.9.3", + "fabpot/php-cs-fixer": "^1.11.4", "filp/whoops": "^1.1", "phpunit/phpunit": "^4.8 || ^5.2", "proophsoftware/prooph-cli": "^0.2.0", diff --git a/src/Container/Infrastructure/DoctrineDbalConnectionFactory.php b/src/Container/Infrastructure/DoctrineDbalConnectionFactory.php index a2d5d6e..4576623 100644 --- a/src/Container/Infrastructure/DoctrineDbalConnectionFactory.php +++ b/src/Container/Infrastructure/DoctrineDbalConnectionFactory.php @@ -12,7 +12,7 @@ use Doctrine\DBAL\DriverManager; use Interop\Config\ConfigurationTrait; -use Interop\Config\RequiresContainerId; +use Interop\Config\RequiresConfigId; use Interop\Config\RequiresMandatoryOptions; use Interop\Container\ContainerInterface; @@ -21,7 +21,7 @@ * * @package src\Infrastructure\Container */ -final class DoctrineDbalConnectionFactory implements RequiresContainerId, RequiresMandatoryOptions +final class DoctrineDbalConnectionFactory implements RequiresConfigId, RequiresMandatoryOptions { use ConfigurationTrait; @@ -32,7 +32,7 @@ final class DoctrineDbalConnectionFactory implements RequiresContainerId, Requir */ public function __invoke(ContainerInterface $container) { - $options = $this->options($container->get('config')); + $options = $this->options($container->get('config'), 'default'); return DriverManager::getConnection($options); } @@ -42,29 +42,9 @@ public function __invoke(ContainerInterface $container) * * @return string */ - public function vendorName() + public function dimensions() { - return 'doctrine'; - } - - /** - * Returns the package name - * - * @return string - */ - public function packageName() - { - return 'connection'; - } - - /** - * Returns the container identifier - * - * @return string - */ - public function containerId() - { - return 'default'; + return ['doctrine', 'connection']; } /**