Skip to content

Commit

Permalink
Merge pull request #320
Browse files Browse the repository at this point in the history
  • Loading branch information
symfony-flex-server[bot] authored Oct 29, 2018
2 parents 104bdab + 245e200 commit d9ac529
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
_defaults:
public: false

Prooph\EventStoreBusBridge\EventPublisher:
arguments:
- '@prooph_service_bus.default_event_bus'
tags:
- { name: 'prooph_event_store.default.plugin' }

Prooph\EventStoreBusBridge\TransactionManager:
arguments:
- '@app.event_store.default'
tags:
- { name: 'prooph_service_bus.default_command_bus.plugin' }
5 changes: 5 additions & 0 deletions prooph/event-store-bus-bridge/3.1/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prooph_event_store:
stores:
default:
event_store: 'app.event_store.default'

services:
_defaults:
public: false

Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator: ~
9 changes: 9 additions & 0 deletions prooph/event-store-symfony-bundle/0.4/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"bundles": {
"Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

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;

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')
->setDescription('Create event_stream.')
->setHelp('This command creates the event_stream');
}

protected function execute(InputInterface $input, OutputInterface $output)
{
$this->eventStore->create(new Stream(new StreamName('event_stream'), new \ArrayIterator([])));

$output->writeln('<info>Event stream was created successfully.</info>');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
_defaults:
public: false

Prooph\EventStore\EventStore: '@app.event_store.default'

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'

app.event_store.pdo_connection.mysql:
class: \PDO
arguments:
- '%env(MYSQL_DSN)%'
- '%env(MYSQL_USER)%'
- '%env(MYSQL_PASSWORD)%'

app.event_store.mysql.persistence_strategy:
class: Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy
13 changes: 13 additions & 0 deletions prooph/pdo-event-store/1.7/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"copy-from-package": {
"scripts/": "%CONFIG_DIR%/scripts/"
},
"env": {
"MYSQL_DSN": "mysql:host=127.0.0.1;dbname=event_streams",
"MYSQL_USER": "user",
"MYSQL_PASSWORD": "password"
}
}
8 changes: 8 additions & 0 deletions prooph/pdo-event-store/1.7/post-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> MySql Event Store Configuration </>
<bg=blue;fg=white> </>

* Modify your MYSQL_* configuration in <fg=green>.env</>

* Create event streams and projections tables using SQL scripts
in <comment>%CONFIG_DIR%/scripts/*</comment>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prooph_service_bus:
command_buses:
default_command_bus: ~
event_buses:
default_event_bus: ~
query_buses:
default_query_bus: ~

services:
_defaults:
public: false

Prooph\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus'
8 changes: 8 additions & 0 deletions prooph/service-bus-symfony-bundle/0.6/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bundles": {
"Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
}
}
9 changes: 9 additions & 0 deletions prooph/service-bus-symfony-bundle/0.6/post-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> Service Bus Configuration </>
<bg=blue;fg=white> </>

* Verify and uncomment the configuration in <comment>%CONFIG_DIR%/packages/prooph_service_bus.yaml</>
to register message handlers

* Dispatch commands by injecting
the <comment>Prooph\ServiceBus\CommandBus</comment> service into your controllers

0 comments on commit d9ac529

Please sign in to comment.