Skip to content

Commit

Permalink
Merge pull request #79 from sandrokeil/feature/interop-config-v1
Browse files Browse the repository at this point in the history
fix DoctrineDbalConnectionFactory for interop-config v1 and update dependencies
  • Loading branch information
prolic committed Jul 1, 2016
2 parents 077c6ce + 3148a9b commit fa02858
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 36 deletions.
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
30 changes: 5 additions & 25 deletions src/Container/Infrastructure/DoctrineDbalConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -21,7 +21,7 @@
*
* @package src\Infrastructure\Container
*/
final class DoctrineDbalConnectionFactory implements RequiresContainerId, RequiresMandatoryOptions
final class DoctrineDbalConnectionFactory implements RequiresConfigId, RequiresMandatoryOptions
{
use ConfigurationTrait;

Expand All @@ -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);
}
Expand All @@ -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'];
}

/**
Expand Down

0 comments on commit fa02858

Please sign in to comment.