-
-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
prooph/event-store-bus-bridge/3.1/config/packages/prooph_event_store_bus_bridge.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"copy-from-recipe": { | ||
"config/": "%CONFIG_DIR%/" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
prooph/event-store-symfony-bundle/0.4/config/packages/prooph_event_store.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%/" | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
prooph/event-store-symfony-bundle/0.4/src/Command/CreateEventStreamCommand.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>'); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
prooph/pdo-event-store/1.7/config/packages/prooph_pdo_event_store.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
13 changes: 13 additions & 0 deletions
13
prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |