From 47394ca8b1cb59620b6fd24d4b46e810beca6c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Tue, 19 Jun 2018 20:05:11 +0100 Subject: [PATCH] Removed comments from config files --- .../packages/prooph_event_store_bus_bridge.yaml | 14 +++++--------- .../0.4/config/packages/prooph_event_store.yaml | 4 ---- .../0.4/src/Command/CreateEventStreamCommand.php | 13 ++++++++++--- .../config/packages/prooph_pdo_event_store.yaml | 2 ++ .../0.6/config/packages/prooph_service_bus.yaml | 12 ------------ 5 files changed, 17 insertions(+), 28 deletions(-) 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 aaa9fc14..ed23c389 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 @@ -8,12 +8,8 @@ services: tags: - { name: 'prooph_event_store.default.plugin' } - # 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\EventStoreBusBridge\TransactionManager: - # arguments: - # - '@app.event_store.default' - # tags: - # - { name: 'prooph_service_bus.default_command_bus.plugin' } + Prooph\EventStoreBusBridge\TransactionManager: + arguments: + - '@app.event_store.default' + tags: + - { 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 01620ed2..7e317626 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 @@ -2,10 +2,6 @@ prooph_event_store: stores: default: event_store: 'app.event_store.default' - # repositories: - # App\EventSourcing\TodoRepository: - # aggregate_type: App\EventSourcing\Todo - # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator services: _defaults: diff --git a/prooph/event-store-symfony-bundle/0.4/src/Command/CreateEventStreamCommand.php b/prooph/event-store-symfony-bundle/0.4/src/Command/CreateEventStreamCommand.php index 80199600..e74bd5ff 100644 --- a/prooph/event-store-symfony-bundle/0.4/src/Command/CreateEventStreamCommand.php +++ b/prooph/event-store-symfony-bundle/0.4/src/Command/CreateEventStreamCommand.php @@ -4,14 +4,22 @@ declare(strict_types=1); namespace App\Command; +use Prooph\EventStore\EventStore; use Prooph\EventStore\Stream; use Prooph\EventStore\StreamName; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class CreateEventStreamCommand extends ContainerAwareCommand +final class CreateEventStreamCommand extends ContainerAwareCommand { + private $eventStore; + + public function __construct(EventStore $eventStore) + { + $this->eventStore = $eventStore; + } + protected function configure() { $this->setName('event-store:event-stream:create') @@ -21,9 +29,8 @@ class CreateEventStreamCommand extends ContainerAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { - $eventStore = $this->getContainer()->get('prooph_event_store.app'); + $this->eventStore->create(new Stream(new StreamName('event_stream'), new \ArrayIterator([]))); - $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 2b8c08ba..056aa258 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 @@ -2,6 +2,8 @@ services: _defaults: public: false + Prooph\EventStore\EventStore: '@app.event_store.default' + app.event_store.default: class: Prooph\EventStore\Pdo\MySqlEventStore arguments: 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 c3475381..faaa0df4 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 @@ -11,15 +11,3 @@ services: public: false Prooph\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' - - # Autoregister your message handlers here - # Make sure App\Messaging\* services are not overriden in `config/services.yaml` - # Read more at https://github.com/prooph/service-bus-symfony-bundle/blob/master/doc/routing.md - # - # command_handlers: - # resource: '../../src/Messaging/Command/*Handler.php' - # namespace: App\Messaging\Command\ - # public: true - # autowire: true - # tags: - # - { name: 'prooph_service_bus.default_command_bus.route_target', message_detection: true }