diff --git a/prooph/event-store-symfony-bundle/0.4/manifest.json b/prooph/event-store-symfony-bundle/0.4/manifest.json index 047bbf30..9dc52b31 100644 --- a/prooph/event-store-symfony-bundle/0.4/manifest.json +++ b/prooph/event-store-symfony-bundle/0.4/manifest.json @@ -3,6 +3,7 @@ "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] }, "copy-from-recipe": { - "config/": "%CONFIG_DIR%/" + "config/": "%CONFIG_DIR%/", + "src/": "%SRC_DIR%/" } } 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 new file mode 100644 index 00000000..80199600 --- /dev/null +++ b/prooph/event-store-symfony-bundle/0.4/src/Command/CreateEventStreamCommand.php @@ -0,0 +1,29 @@ +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/event-store-symfony-bundle/0.5/manifest.json b/prooph/event-store-symfony-bundle/0.5/manifest.json index 047bbf30..9dc52b31 100644 --- a/prooph/event-store-symfony-bundle/0.5/manifest.json +++ b/prooph/event-store-symfony-bundle/0.5/manifest.json @@ -3,6 +3,7 @@ "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] }, "copy-from-recipe": { - "config/": "%CONFIG_DIR%/" + "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 new file mode 100644 index 00000000..80199600 --- /dev/null +++ b/prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php @@ -0,0 +1,29 @@ +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.'); + } +}