Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added recipe for the Prooph pack #320

Merged
31 commits merged into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ff73795
Added recipe for prooph/service-bus-symfony-bundle
gquemener Mar 19, 2018
1d6cb4b
Fixed invalid versionning
gquemener Mar 19, 2018
1d495c0
Register ProophServiceBusBundle
gquemener Mar 19, 2018
a3e37cc
Autowired default command bus
gquemener Mar 19, 2018
41dca24
Auto-register command handlers
gquemener Mar 19, 2018
9e9d069
Revert "Auto-register command handlers"
gquemener Mar 19, 2018
2fde35c
Defined recipe for the prooph pack
gquemener Mar 20, 2018
17a7249
Defined prooph service bus bundle default config
gquemener Mar 20, 2018
26ec16d
Autowired command handlers
gquemener Mar 20, 2018
b5711fb
Added empty command directory
gquemener Mar 20, 2018
31b7ce8
Added initial configuration of the prooph pack
gquemener Mar 21, 2018
f418071
Fixed malformed bundle FQCN
gquemener Mar 21, 2018
fb0e9e5
Moved config in the correct directory
gquemener Mar 21, 2018
2013913
No need to copy the content of the src/ directory
gquemener Mar 21, 2018
053b5d8
Created Prooph package recipes
gquemener Mar 22, 2018
d218ca1
Renamed pdo event store config file
gquemener Mar 22, 2018
1054024
Copied database init scripts into config directory
gquemener Mar 22, 2018
ee6ef3a
Eased default stream creation
gquemener Mar 22, 2018
1db9529
Dispatched persisted events on app event bus
gquemener Mar 22, 2018
02c6ded
Added configuration to setup TransactionManager
gquemener Mar 22, 2018
c48c336
Used comand bus lib interface for service id
gquemener Mar 23, 2018
403a1fa
Increased explicitness of service definitions
gquemener Mar 23, 2018
2385bdc
Added a default query bus
gquemener Mar 23, 2018
e167532
Added hint to auto register command handlers
gquemener Mar 23, 2018
6232196
Added post installation hints
gquemener Mar 23, 2018
f45406f
Fixed PDO event store SQL scripts copy
gquemener Mar 23, 2018
00ba2ea
Fixed multi-package travis build
gquemener Mar 24, 2018
3bf651b
Reverted style change
gquemener May 13, 2018
838f441
Reverted travis multi packages support
gquemener Jun 19, 2018
47394ca
Removed comments from config files
gquemener Jun 19, 2018
245e200
Reduced number of env vars
gquemener Jun 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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