From 403a1fa4df66cdf7917d6dd65249d13537c0d757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Fri, 23 Mar 2018 11:48:49 +0100 Subject: [PATCH] Increased explicitness of service definitions --- .../prooph_event_store_bus_bridge.yaml | 15 ++++++---- .../config/packages/prooph_event_store.yaml | 9 ++++-- .../config/packages/prooph_event_store.yaml | 8 ----- .../0.5/manifest.json | 9 ------ .../src/Command/CreateEventStreamCommand.php | 29 ------------------- .../packages/prooph_pdo_event_store.yaml | 18 +++++------- .../config/packages/prooph_service_bus.yaml | 9 +++--- 7 files changed, 27 insertions(+), 70 deletions(-) delete mode 100644 prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml delete mode 100644 prooph/event-store-symfony-bundle/0.5/manifest.json delete mode 100644 prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php diff --git a/prooph/event-store-bus-bridge/3.1/config/packages/prooph_event_store_bus_bridge.yaml b/prooph/event-store-bus-bridge/3.1/config/packages/prooph_event_store_bus_bridge.yaml index 6cbce6f6..aaa9fc14 100644 --- a/prooph/event-store-bus-bridge/3.1/config/packages/prooph_event_store_bus_bridge.yaml +++ b/prooph/event-store-bus-bridge/3.1/config/packages/prooph_event_store_bus_bridge.yaml @@ -1,16 +1,19 @@ services: _defaults: - autowire: true + public: false Prooph\EventStoreBusBridge\EventPublisher: + arguments: + - '@prooph_service_bus.default_event_bus' tags: - - { name: 'prooph_event_store.app.plugin' } + - { name: 'prooph_event_store.default.plugin' } - # Uncomment these lines if your event store support transaction + # The app.event_store.default service must be configured with a + # Prooph\EventStore\TransactionalEventStore instance in order to user the following plugin. # Read more: http://docs.getprooph.org/event-store/implementations/pdo_event_store/variants.html#3-2-1-2 # - # Prooph\EventStore\TransactionalEventStore: '@Prooph\EventStore\EventStore' - # # Prooph\EventStoreBusBridge\TransactionManager: + # arguments: + # - '@app.event_store.default' # tags: - # - { name: 'prooph_service_bus.app_command_bus.plugin' } + # - { name: 'prooph_service_bus.default_command_bus.plugin' } diff --git a/prooph/event-store-symfony-bundle/0.4/config/packages/prooph_event_store.yaml b/prooph/event-store-symfony-bundle/0.4/config/packages/prooph_event_store.yaml index 72f083ae..01620ed2 100644 --- a/prooph/event-store-symfony-bundle/0.4/config/packages/prooph_event_store.yaml +++ b/prooph/event-store-symfony-bundle/0.4/config/packages/prooph_event_store.yaml @@ -1,11 +1,14 @@ prooph_event_store: stores: - app: - event_store: 'Prooph\EventStore\EventStore' + default: + event_store: 'app.event_store.default' # repositories: # App\EventSourcing\TodoRepository: # aggregate_type: App\EventSourcing\Todo # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator services: - Prooph\Common\Messaging\MessageFactory: '@prooph_event_store.message_factory' + _defaults: + public: false + + Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator: ~ diff --git a/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml b/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml deleted file mode 100644 index 0e460a9e..00000000 --- a/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml +++ /dev/null @@ -1,8 +0,0 @@ -prooph_event_store: - stores: - app: - event_store: 'Prooph\EventStore\EventStore' - # repositories: - # App\EventSourcing\TodoRepository: - # aggregate_type: App\EventSourcing\Todo - # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator diff --git a/prooph/event-store-symfony-bundle/0.5/manifest.json b/prooph/event-store-symfony-bundle/0.5/manifest.json deleted file mode 100644 index 9dc52b31..00000000 --- a/prooph/event-store-symfony-bundle/0.5/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "bundles": { - "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] - }, - "copy-from-recipe": { - "config/": "%CONFIG_DIR%/", - "src/": "%SRC_DIR%/" - } -} diff --git a/prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php b/prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php deleted file mode 100644 index 80199600..00000000 --- a/prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php +++ /dev/null @@ -1,29 +0,0 @@ -setName('event-store:event-stream:create') - ->setDescription('Create event_stream.') - ->setHelp('This command creates the event_stream'); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $eventStore = $this->getContainer()->get('prooph_event_store.app'); - - $eventStore->create(new Stream(new StreamName('event_stream'), new \ArrayIterator([]))); - $output->writeln('Event stream was created successfully.'); - } -} diff --git a/prooph/pdo-event-store/1.7/config/packages/prooph_pdo_event_store.yaml b/prooph/pdo-event-store/1.7/config/packages/prooph_pdo_event_store.yaml index 79691201..2b8c08ba 100644 --- a/prooph/pdo-event-store/1.7/config/packages/prooph_pdo_event_store.yaml +++ b/prooph/pdo-event-store/1.7/config/packages/prooph_pdo_event_store.yaml @@ -1,22 +1,20 @@ services: _defaults: - autowire: true public: false - Prooph\EventStore\EventStore: '@Prooph\EventStore\Pdo\MySqlEventStore' - Prooph\EventStore\Pdo\PersistenceStrategy: '@Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy' + app.event_store.default: + class: Prooph\EventStore\Pdo\MySqlEventStore + arguments: + - '@prooph_event_store.message_factory' + - '@app.event_store.pdo_connection.mysql' + - '@app.event_store.mysql.persistence_strategy' - PDO: + app.event_store.pdo_connection.mysql: class: \PDO arguments: - 'mysql:host=%env(MYSQL_HOST)%;dbname=%env(MYSQL_DBNAME)%' - '%env(MYSQL_USER)%' - '%env(MYSQL_PASSWORD)%' - Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy: + app.event_store.mysql.persistence_strategy: class: Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy - - Prooph\EventStore\Pdo\MySqlEventStore: - class: Prooph\EventStore\Pdo\MySqlEventStore - - Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator: ~ diff --git a/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml b/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml index 6365179b..ec36725e 100644 --- a/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml +++ b/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml @@ -1,12 +1,11 @@ prooph_service_bus: command_buses: - app_command_bus: ~ + default_command_bus: ~ event_buses: - app_event_bus: ~ + default_event_bus: ~ services: _defaults: - autowire: true + public: false - Prooph\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' - Prooph\ServiceBus\EventBus: '@prooph_service_bus.app_event_bus' + Prooph\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus'