From 59374c7c235ca8ad2f5a7aae28891edd3f8b6efc Mon Sep 17 00:00:00 2001 From: Sandro Keil Date: Thu, 28 Apr 2016 20:54:43 +0200 Subject: [PATCH 1/3] update to prooph-cli 0.2.0 and add Psr4ClassInfo factory --- composer.json | 2 +- .../autoload/prooph_dependencies.global.php | 1 + .../Console/Psr4ClassInfoFactory.php | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/Container/Console/Psr4ClassInfoFactory.php diff --git a/composer.json b/composer.json index aa0d192..dd5f7dd 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "fabpot/php-cs-fixer": "^1.9.3", "filp/whoops": "^1.1", "phpunit/phpunit": "^4.8 || ^5.2", - "proophsoftware/prooph-cli": "^0.1.2", + "proophsoftware/prooph-cli": "^0.2.0", "symfony/stopwatch": "^2.7", "satooshi/php-coveralls": "^1.0" }, diff --git a/config/autoload/prooph_dependencies.global.php b/config/autoload/prooph_dependencies.global.php index 9b5bdba..dc410d7 100644 --- a/config/autoload/prooph_dependencies.global.php +++ b/config/autoload/prooph_dependencies.global.php @@ -46,6 +46,7 @@ //prooph/event-store-bus-bridge set up \Prooph\EventStoreBusBridge\TransactionManager::class => \Prooph\EventStoreBusBridge\Container\TransactionManagerFactory::class, \Prooph\EventStoreBusBridge\EventPublisher::class => \Prooph\EventStoreBusBridge\Container\EventPublisherFactory::class, + \Prooph\Cli\Console\Helper\ClassInfo::class => \Prooph\ProophessorDo\Container\Console\Psr4ClassInfoFactory::class, ], ], ]; diff --git a/src/Container/Console/Psr4ClassInfoFactory.php b/src/Container/Console/Psr4ClassInfoFactory.php new file mode 100644 index 0000000..8506da1 --- /dev/null +++ b/src/Container/Console/Psr4ClassInfoFactory.php @@ -0,0 +1,26 @@ + + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +PROOPH; + + return new Psr4Info( + 'src', + 'Prooph\\ProophessorDo\\', + $docblock + ); + } +} From 930a9c3e7eb44eeebdf4f4405dbcf22428089e61 Mon Sep 17 00:00:00 2001 From: Sandro Keil Date: Sat, 30 Apr 2016 11:58:55 +0200 Subject: [PATCH 2/3] update factories to interop-config 1.0 --- composer.json | 2 +- .../Mail/SendTodoReminderMailSubscriberFactory.php | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index aa0d192..0f4edb0 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "prooph/psr7-middleware": "^0.1", "prooph/service-bus" : "^5.0", "roave/security-advisories": "dev-master", - "sandrokeil/interop-config": "^0.3.1", + "sandrokeil/interop-config": "^1.0", "zendframework/zend-config": "^2.6", "zendframework/zend-expressive" : "^1.0", "zendframework/zend-expressive-aurarouter": "^1.0", diff --git a/src/Container/App/Mail/SendTodoReminderMailSubscriberFactory.php b/src/Container/App/Mail/SendTodoReminderMailSubscriberFactory.php index 80c40b7..c0c8c4e 100644 --- a/src/Container/App/Mail/SendTodoReminderMailSubscriberFactory.php +++ b/src/Container/App/Mail/SendTodoReminderMailSubscriberFactory.php @@ -28,17 +28,9 @@ final class SendTodoReminderMailSubscriberFactory implements RequiresConfig, Req /** * @inheritdoc */ - public function vendorName() + public function dimensions() { - return 'proophessor-do'; - } - - /** - * @inheritdoc - */ - public function packageName() - { - return 'mail'; + return ['proophessor-do', 'mail']; } /** From 3148a9bfee6cb61a7aa88a9bdce749c1d3bf8fe7 Mon Sep 17 00:00:00 2001 From: Sandro Keil Date: Fri, 1 Jul 2016 18:11:34 +0200 Subject: [PATCH 3/3] fix DoctrineDbalConnectionFactory for interop-config v1 and update dependencies --- composer.json | 22 +++++++------- .../DoctrineDbalConnectionFactory.php | 30 ++++--------------- 2 files changed, 16 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index 0f4edb0..44f92ec 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.1.2", 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']; } /**