Skip to content

Commit 3148a9b

Browse files
committed
fix DoctrineDbalConnectionFactory for interop-config v1 and update dependencies
1 parent 7511cc6 commit 3148a9b

File tree

2 files changed

+16
-36
lines changed

2 files changed

+16
-36
lines changed

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,28 @@
3333
"require": {
3434
"php": "^5.5 || ^7.0",
3535
"aura/router" : "^2.3",
36-
"doctrine/dbal": "^2.5",
37-
"doctrine/migrations": "^1.0",
36+
"doctrine/dbal": "^2.5.4",
37+
"doctrine/migrations": "^1.4.1",
3838
"nicolopignatelli/valueobjects": "^3.0",
3939
"prooph/event-sourcing" : "^4.0",
40-
"prooph/event-store" : "^6.0",
40+
"prooph/event-store" : "^6.3",
4141
"prooph/event-store-bus-bridge" : "^2.0",
42-
"prooph/psr7-middleware": "^0.1",
43-
"prooph/service-bus" : "^5.0",
42+
"prooph/psr7-middleware": "^0.3",
43+
"prooph/service-bus" : "^5.1",
4444
"roave/security-advisories": "dev-master",
4545
"sandrokeil/interop-config": "^1.0",
4646
"zendframework/zend-config": "^2.6",
4747
"zendframework/zend-expressive" : "^1.0",
4848
"zendframework/zend-expressive-aurarouter": "^1.0",
4949
"zendframework/zend-expressive-helpers": "^2.0",
50-
"zendframework/zend-expressive-zendviewrenderer": "^1.0.1",
51-
"zendframework/zend-filter": "^2.6",
52-
"zendframework/zend-servicemanager" : "^2.7.5 || ^3.0.3",
53-
"zendframework/zend-stdlib": "^2.7",
54-
"zendframework/zend-mail": "^2.6"
50+
"zendframework/zend-expressive-zendviewrenderer": "^1.1.0",
51+
"zendframework/zend-filter": "^2.7.1",
52+
"zendframework/zend-servicemanager" : "^3.0.3",
53+
"zendframework/zend-stdlib": "^3.0.1",
54+
"zendframework/zend-mail": "^2.7.1"
5555
},
5656
"require-dev" : {
57-
"fabpot/php-cs-fixer": "^1.9.3",
57+
"fabpot/php-cs-fixer": "^1.11.4",
5858
"filp/whoops": "^1.1",
5959
"phpunit/phpunit": "^4.8 || ^5.2",
6060
"proophsoftware/prooph-cli": "^0.1.2",

src/Container/Infrastructure/DoctrineDbalConnectionFactory.php

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
use Doctrine\DBAL\DriverManager;
1414
use Interop\Config\ConfigurationTrait;
15-
use Interop\Config\RequiresContainerId;
15+
use Interop\Config\RequiresConfigId;
1616
use Interop\Config\RequiresMandatoryOptions;
1717
use Interop\Container\ContainerInterface;
1818

@@ -21,7 +21,7 @@
2121
*
2222
* @package src\Infrastructure\Container
2323
*/
24-
final class DoctrineDbalConnectionFactory implements RequiresContainerId, RequiresMandatoryOptions
24+
final class DoctrineDbalConnectionFactory implements RequiresConfigId, RequiresMandatoryOptions
2525
{
2626
use ConfigurationTrait;
2727

@@ -32,7 +32,7 @@ final class DoctrineDbalConnectionFactory implements RequiresContainerId, Requir
3232
*/
3333
public function __invoke(ContainerInterface $container)
3434
{
35-
$options = $this->options($container->get('config'));
35+
$options = $this->options($container->get('config'), 'default');
3636

3737
return DriverManager::getConnection($options);
3838
}
@@ -42,29 +42,9 @@ public function __invoke(ContainerInterface $container)
4242
*
4343
* @return string
4444
*/
45-
public function vendorName()
45+
public function dimensions()
4646
{
47-
return 'doctrine';
48-
}
49-
50-
/**
51-
* Returns the package name
52-
*
53-
* @return string
54-
*/
55-
public function packageName()
56-
{
57-
return 'connection';
58-
}
59-
60-
/**
61-
* Returns the container identifier
62-
*
63-
* @return string
64-
*/
65-
public function containerId()
66-
{
67-
return 'default';
47+
return ['doctrine', 'connection'];
6848
}
6949

7050
/**

0 commit comments

Comments
 (0)