From ff737959b5bbefa2659f6708d9444c720d4f8630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Mon, 19 Mar 2018 11:46:01 +0100 Subject: [PATCH 01/31] Added recipe for prooph/service-bus-symfony-bundle --- .../0.6.0/config/packages/prooph_service_bus.yaml | 3 +++ prooph/service-bus-symfony-bundle/0.6.0/manifest.json | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 prooph/service-bus-symfony-bundle/0.6.0/config/packages/prooph_service_bus.yaml create mode 100644 prooph/service-bus-symfony-bundle/0.6.0/manifest.json diff --git a/prooph/service-bus-symfony-bundle/0.6.0/config/packages/prooph_service_bus.yaml b/prooph/service-bus-symfony-bundle/0.6.0/config/packages/prooph_service_bus.yaml new file mode 100644 index 000000000..1f7158aed --- /dev/null +++ b/prooph/service-bus-symfony-bundle/0.6.0/config/packages/prooph_service_bus.yaml @@ -0,0 +1,3 @@ +prooph_service_bus: + command_buses: + default_command_bus: ~ diff --git a/prooph/service-bus-symfony-bundle/0.6.0/manifest.json b/prooph/service-bus-symfony-bundle/0.6.0/manifest.json new file mode 100644 index 000000000..e164c6e63 --- /dev/null +++ b/prooph/service-bus-symfony-bundle/0.6.0/manifest.json @@ -0,0 +1,5 @@ +{ + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} From 1d6cb4b8ac61e5149c88ffb063b3ba05195cb407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Mon, 19 Mar 2018 12:03:12 +0100 Subject: [PATCH 02/31] Fixed invalid versionning --- .../{0.6.0 => 0.6}/config/packages/prooph_service_bus.yaml | 0 prooph/service-bus-symfony-bundle/{0.6.0 => 0.6}/manifest.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename prooph/service-bus-symfony-bundle/{0.6.0 => 0.6}/config/packages/prooph_service_bus.yaml (100%) rename prooph/service-bus-symfony-bundle/{0.6.0 => 0.6}/manifest.json (100%) diff --git a/prooph/service-bus-symfony-bundle/0.6.0/config/packages/prooph_service_bus.yaml b/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml similarity index 100% rename from prooph/service-bus-symfony-bundle/0.6.0/config/packages/prooph_service_bus.yaml rename to prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml diff --git a/prooph/service-bus-symfony-bundle/0.6.0/manifest.json b/prooph/service-bus-symfony-bundle/0.6/manifest.json similarity index 100% rename from prooph/service-bus-symfony-bundle/0.6.0/manifest.json rename to prooph/service-bus-symfony-bundle/0.6/manifest.json From 1d495c0ad03bf1d02d005be0b478972158a9ba18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Mon, 19 Mar 2018 12:07:09 +0100 Subject: [PATCH 03/31] Register ProophServiceBusBundle --- prooph/service-bus-symfony-bundle/0.6/manifest.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prooph/service-bus-symfony-bundle/0.6/manifest.json b/prooph/service-bus-symfony-bundle/0.6/manifest.json index e164c6e63..f32f1893d 100644 --- a/prooph/service-bus-symfony-bundle/0.6/manifest.json +++ b/prooph/service-bus-symfony-bundle/0.6/manifest.json @@ -1,4 +1,7 @@ { + "bundles": { + "Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"] + }, "copy-from-recipe": { "config/": "%CONFIG_DIR%/" } From a3e37cc24e0febbc0ac4e6a5cbe6e16722b3e583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Mon, 19 Mar 2018 13:30:40 +0100 Subject: [PATCH 04/31] Autowired default command bus --- .../0.6/config/packages/prooph_service_bus.yaml | 3 +++ 1 file changed, 3 insertions(+) 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 1f7158aed..35d757504 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 @@ -1,3 +1,6 @@ +services: + Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' + prooph_service_bus: command_buses: default_command_bus: ~ From 41dca242971f92a718db17199fa4ff8048070056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Mon, 19 Mar 2018 14:57:09 +0100 Subject: [PATCH 05/31] Auto-register command handlers --- .../0.6/config/packages/prooph_service_bus.yaml | 3 --- .../service-bus-symfony-bundle/0.6/config/services.yaml | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 prooph/service-bus-symfony-bundle/0.6/config/services.yaml 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 35d757504..1f7158aed 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 @@ -1,6 +1,3 @@ -services: - Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' - prooph_service_bus: command_buses: default_command_bus: ~ diff --git a/prooph/service-bus-symfony-bundle/0.6/config/services.yaml b/prooph/service-bus-symfony-bundle/0.6/config/services.yaml new file mode 100644 index 000000000..df935807d --- /dev/null +++ b/prooph/service-bus-symfony-bundle/0.6/config/services.yaml @@ -0,0 +1,8 @@ +services: + Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' + + command_handlers: + namespace: App\Messaging\Command\ + public: true + resource: '../src/Messaging/Command/*Handler.php' + tags: [{ name: 'prooph_service_bus.default_command_bus.route_target', message_detection: true }] From 9e9d0694201d800a30d019574d0c111def1daf6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Mon, 19 Mar 2018 15:02:28 +0100 Subject: [PATCH 06/31] Revert "Auto-register command handlers" This reverts commit 41dca242971f92a718db17199fa4ff8048070056. --- .../0.6/config/packages/prooph_service_bus.yaml | 3 +++ .../service-bus-symfony-bundle/0.6/config/services.yaml | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) delete mode 100644 prooph/service-bus-symfony-bundle/0.6/config/services.yaml 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 1f7158aed..35d757504 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 @@ -1,3 +1,6 @@ +services: + Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' + prooph_service_bus: command_buses: default_command_bus: ~ diff --git a/prooph/service-bus-symfony-bundle/0.6/config/services.yaml b/prooph/service-bus-symfony-bundle/0.6/config/services.yaml deleted file mode 100644 index df935807d..000000000 --- a/prooph/service-bus-symfony-bundle/0.6/config/services.yaml +++ /dev/null @@ -1,8 +0,0 @@ -services: - Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' - - command_handlers: - namespace: App\Messaging\Command\ - public: true - resource: '../src/Messaging/Command/*Handler.php' - tags: [{ name: 'prooph_service_bus.default_command_bus.route_target', message_detection: true }] From 2fde35c7918bb27276686a92921c0787b08da344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Tue, 20 Mar 2018 16:24:34 +0100 Subject: [PATCH 07/31] Defined recipe for the prooph pack --- .../dev-master@dev/config/packages/prooph_service_bus.yaml | 6 ++++++ .../prooph-pack/dev-master@dev}/manifest.json | 0 .../0.6/config/packages/prooph_service_bus.yaml | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml rename {prooph/service-bus-symfony-bundle/0.6 => gquemener/prooph-pack/dev-master@dev}/manifest.json (100%) delete mode 100644 prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml diff --git a/gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml b/gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml new file mode 100644 index 000000000..6dd6d547e --- /dev/null +++ b/gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml @@ -0,0 +1,6 @@ +services: + Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' + +prooph_service_bus: + command_buses: + app_command_bus: ~ diff --git a/prooph/service-bus-symfony-bundle/0.6/manifest.json b/gquemener/prooph-pack/dev-master@dev/manifest.json similarity index 100% rename from prooph/service-bus-symfony-bundle/0.6/manifest.json rename to gquemener/prooph-pack/dev-master@dev/manifest.json 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 deleted file mode 100644 index 35d757504..000000000 --- a/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml +++ /dev/null @@ -1,6 +0,0 @@ -services: - Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' - -prooph_service_bus: - command_buses: - default_command_bus: ~ From 17a7249d77dcda1e82c4743a149786e8bd9de483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Tue, 20 Mar 2018 18:50:49 +0100 Subject: [PATCH 08/31] Defined prooph service bus bundle default config --- .../config/packages/prooph_service_bus.yaml | 6 ------ .../0.6/config/packages/prooph_service_bus.yaml | 14 ++++++++++++++ .../service-bus-symfony-bundle/0.6}/manifest.json | 0 3 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml create mode 100644 prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml rename {gquemener/prooph-pack/dev-master@dev => prooph/service-bus-symfony-bundle/0.6}/manifest.json (100%) diff --git a/gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml b/gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml deleted file mode 100644 index 6dd6d547e..000000000 --- a/gquemener/prooph-pack/dev-master@dev/config/packages/prooph_service_bus.yaml +++ /dev/null @@ -1,6 +0,0 @@ -services: - Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' - -prooph_service_bus: - command_buses: - app_command_bus: ~ 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 new file mode 100644 index 000000000..35ca69187 --- /dev/null +++ b/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml @@ -0,0 +1,14 @@ +prooph_service_bus: + command_buses: + app_command_bus: ~ + +services: + Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' + + # Make sure App\Messaging\* services are not overriden in `config/services.yaml` + command_handlers: + resource: '../../src/Messaging/Command' + namespace: App\Messaging\Command\ + public: true + tags: + - { name: 'prooph_service_bus.app_command_bus.route_target', message_detection: true } diff --git a/gquemener/prooph-pack/dev-master@dev/manifest.json b/prooph/service-bus-symfony-bundle/0.6/manifest.json similarity index 100% rename from gquemener/prooph-pack/dev-master@dev/manifest.json rename to prooph/service-bus-symfony-bundle/0.6/manifest.json From 26ec16d08b91802dafcc5f5a47e87e1822d79bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Tue, 20 Mar 2018 18:55:29 +0100 Subject: [PATCH 09/31] Autowired command handlers --- .../0.6/config/packages/prooph_service_bus.yaml | 3 +++ 1 file changed, 3 insertions(+) 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 35ca69187..cd80d9260 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 @@ -3,6 +3,9 @@ prooph_service_bus: app_command_bus: ~ services: + _defaults: + autowire: true + Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' # Make sure App\Messaging\* services are not overriden in `config/services.yaml` From b5711fb3106731e2f87c9efa535a7f00120cc606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Tue, 20 Mar 2018 19:00:58 +0100 Subject: [PATCH 10/31] Added empty command directory --- prooph/service-bus-symfony-bundle/0.6/manifest.json | 3 ++- .../0.6/src/Messaging/Command/.gitignore | 0 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 prooph/service-bus-symfony-bundle/0.6/src/Messaging/Command/.gitignore diff --git a/prooph/service-bus-symfony-bundle/0.6/manifest.json b/prooph/service-bus-symfony-bundle/0.6/manifest.json index f32f1893d..9fe441ec2 100644 --- a/prooph/service-bus-symfony-bundle/0.6/manifest.json +++ b/prooph/service-bus-symfony-bundle/0.6/manifest.json @@ -3,6 +3,7 @@ "Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"] }, "copy-from-recipe": { - "config/": "%CONFIG_DIR%/" + "config/": "%CONFIG_DIR%/", + "src/": "%SRC_DIR%/" } } diff --git a/prooph/service-bus-symfony-bundle/0.6/src/Messaging/Command/.gitignore b/prooph/service-bus-symfony-bundle/0.6/src/Messaging/Command/.gitignore new file mode 100644 index 000000000..e69de29bb From 31b7ce8609dc1657084e1439b3417ce57496a9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Wed, 21 Mar 2018 16:21:18 +0100 Subject: [PATCH 11/31] Added initial configuration of the prooph pack --- .../pdo-event-sourcing-pack/1.0/manifest.json | 16 ++++++++++ .../1.0/packages/prooph_event_store.yaml | 32 +++++++++++++++++++ .../1.0/packages/prooph_service_bus.yaml | 9 ++++++ .../config/packages/prooph_service_bus.yaml | 17 ---------- .../0.6/manifest.json | 9 ------ .../0.6/src/Messaging/Command/.gitignore | 0 6 files changed, 57 insertions(+), 26 deletions(-) create mode 100644 prooph/pdo-event-sourcing-pack/1.0/manifest.json create mode 100644 prooph/pdo-event-sourcing-pack/1.0/packages/prooph_event_store.yaml create mode 100644 prooph/pdo-event-sourcing-pack/1.0/packages/prooph_service_bus.yaml delete mode 100644 prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml delete mode 100644 prooph/service-bus-symfony-bundle/0.6/manifest.json delete mode 100644 prooph/service-bus-symfony-bundle/0.6/src/Messaging/Command/.gitignore diff --git a/prooph/pdo-event-sourcing-pack/1.0/manifest.json b/prooph/pdo-event-sourcing-pack/1.0/manifest.json new file mode 100644 index 000000000..ac9ec3dad --- /dev/null +++ b/prooph/pdo-event-sourcing-pack/1.0/manifest.json @@ -0,0 +1,16 @@ +{ + "bundles": { + "Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"], + "Prooph\Bundle\EventStore\ProophEventStoreBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/", + "src/": "%SRC_DIR%/" + }, + "env": { + "MYSQL_HOST": "127.0.0.1", + "MYSQL_DBNAME": "event_streams", + "MYSQL_USER": "user", + "MYSQL_PASSWORD": "password" + } +} diff --git a/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_event_store.yaml b/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_event_store.yaml new file mode 100644 index 000000000..3810695c3 --- /dev/null +++ b/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_event_store.yaml @@ -0,0 +1,32 @@ +prooph_event_store: + stores: + app: + event_store: 'Prooph\EventStore\EventStore' + # repositories: + # App\EventSourcing\TodoRepository: + # aggregate_type: App\EventSourcing\Todo + # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator + +services: + _defaults: + autowire: true + public: false + + Prooph\EventStore\EventStore: '@Prooph\EventStore\Pdo\MySqlEventStore' + Prooph\EventStore\Pdo\PersistenceStrategy: '@Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy' + Prooph\Common\Messaging\MessageFactory: '@prooph_event_store.message_factory' + + PDO: + class: \PDO + arguments: + - 'mysql:host=%env(MYSQL_HOST)%;dbname=%env(MYSQL_DBNAME)%' + - '%env(MYSQL_USER)%' + - '%env(MYSQL_PASSWORD)%' + + Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy: + class: Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy + + Prooph\EventStore\Pdo\MySqlEventStore: + class: Prooph\EventStore\Pdo\MySqlEventStore + + Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator: ~ diff --git a/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_service_bus.yaml b/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_service_bus.yaml new file mode 100644 index 000000000..294e2b5ef --- /dev/null +++ b/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_service_bus.yaml @@ -0,0 +1,9 @@ +prooph_service_bus: + command_buses: + app_command_bus: ~ + +services: + _defaults: + autowire: true + + Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' 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 deleted file mode 100644 index cd80d9260..000000000 --- a/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml +++ /dev/null @@ -1,17 +0,0 @@ -prooph_service_bus: - command_buses: - app_command_bus: ~ - -services: - _defaults: - autowire: true - - Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' - - # Make sure App\Messaging\* services are not overriden in `config/services.yaml` - command_handlers: - resource: '../../src/Messaging/Command' - namespace: App\Messaging\Command\ - public: true - tags: - - { name: 'prooph_service_bus.app_command_bus.route_target', message_detection: true } diff --git a/prooph/service-bus-symfony-bundle/0.6/manifest.json b/prooph/service-bus-symfony-bundle/0.6/manifest.json deleted file mode 100644 index 9fe441ec2..000000000 --- a/prooph/service-bus-symfony-bundle/0.6/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "bundles": { - "Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"] - }, - "copy-from-recipe": { - "config/": "%CONFIG_DIR%/", - "src/": "%SRC_DIR%/" - } -} diff --git a/prooph/service-bus-symfony-bundle/0.6/src/Messaging/Command/.gitignore b/prooph/service-bus-symfony-bundle/0.6/src/Messaging/Command/.gitignore deleted file mode 100644 index e69de29bb..000000000 From f41807147211242ff403db929856c9256c7b4d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Wed, 21 Mar 2018 16:22:43 +0100 Subject: [PATCH 12/31] Fixed malformed bundle FQCN --- prooph/pdo-event-sourcing-pack/1.0/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prooph/pdo-event-sourcing-pack/1.0/manifest.json b/prooph/pdo-event-sourcing-pack/1.0/manifest.json index ac9ec3dad..05e57a398 100644 --- a/prooph/pdo-event-sourcing-pack/1.0/manifest.json +++ b/prooph/pdo-event-sourcing-pack/1.0/manifest.json @@ -1,7 +1,7 @@ { "bundles": { "Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"], - "Prooph\Bundle\EventStore\ProophEventStoreBundle": ["all"] + "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] }, "copy-from-recipe": { "config/": "%CONFIG_DIR%/", From fb0e9e5f40b9f6f3d6abb6ed148731c989ba337a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Wed, 21 Mar 2018 16:24:23 +0100 Subject: [PATCH 13/31] Moved config in the correct directory --- .../1.0/{ => config}/packages/prooph_event_store.yaml | 0 .../1.0/{ => config}/packages/prooph_service_bus.yaml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename prooph/pdo-event-sourcing-pack/1.0/{ => config}/packages/prooph_event_store.yaml (100%) rename prooph/pdo-event-sourcing-pack/1.0/{ => config}/packages/prooph_service_bus.yaml (100%) diff --git a/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_event_store.yaml b/prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_event_store.yaml similarity index 100% rename from prooph/pdo-event-sourcing-pack/1.0/packages/prooph_event_store.yaml rename to prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_event_store.yaml diff --git a/prooph/pdo-event-sourcing-pack/1.0/packages/prooph_service_bus.yaml b/prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_service_bus.yaml similarity index 100% rename from prooph/pdo-event-sourcing-pack/1.0/packages/prooph_service_bus.yaml rename to prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_service_bus.yaml From 2013913487071b3d650bff6ca85983b1e9a73d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Wed, 21 Mar 2018 16:29:41 +0100 Subject: [PATCH 14/31] No need to copy the content of the src/ directory --- prooph/pdo-event-sourcing-pack/1.0/manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/prooph/pdo-event-sourcing-pack/1.0/manifest.json b/prooph/pdo-event-sourcing-pack/1.0/manifest.json index 05e57a398..a1a79865e 100644 --- a/prooph/pdo-event-sourcing-pack/1.0/manifest.json +++ b/prooph/pdo-event-sourcing-pack/1.0/manifest.json @@ -4,8 +4,7 @@ "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] }, "copy-from-recipe": { - "config/": "%CONFIG_DIR%/", - "src/": "%SRC_DIR%/" + "config/": "%CONFIG_DIR%/" }, "env": { "MYSQL_HOST": "127.0.0.1", From 053b5d89928ee311faa3b08570ddb9a92a35fda4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 22 Mar 2018 13:03:06 +0100 Subject: [PATCH 15/31] Created Prooph package recipes --- .../0.4/config/packages/prooph_event_store.yaml | 11 +++++++++++ prooph/event-store-symfony-bundle/0.4/manifest.json | 8 ++++++++ .../0.5/config/packages/prooph_event_store.yaml | 8 ++++++++ prooph/event-store-symfony-bundle/0.5/manifest.json | 8 ++++++++ .../1.7/config/package/pdo_event_store.yml} | 10 ---------- .../1.0 => pdo-event-store/1.7}/manifest.json | 4 ---- .../0.6}/config/packages/prooph_service_bus.yaml | 0 prooph/service-bus-symfony-bundle/0.6/manifest.json | 8 ++++++++ 8 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 prooph/event-store-symfony-bundle/0.4/config/packages/prooph_event_store.yaml create mode 100644 prooph/event-store-symfony-bundle/0.4/manifest.json create mode 100644 prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml create mode 100644 prooph/event-store-symfony-bundle/0.5/manifest.json rename prooph/{pdo-event-sourcing-pack/1.0/config/packages/prooph_event_store.yaml => pdo-event-store/1.7/config/package/pdo_event_store.yml} (64%) rename prooph/{pdo-event-sourcing-pack/1.0 => pdo-event-store/1.7}/manifest.json (58%) rename prooph/{pdo-event-sourcing-pack/1.0 => service-bus-symfony-bundle/0.6}/config/packages/prooph_service_bus.yaml (100%) create mode 100644 prooph/service-bus-symfony-bundle/0.6/manifest.json 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 new file mode 100644 index 000000000..72f083ae3 --- /dev/null +++ b/prooph/event-store-symfony-bundle/0.4/config/packages/prooph_event_store.yaml @@ -0,0 +1,11 @@ +prooph_event_store: + stores: + app: + event_store: 'Prooph\EventStore\EventStore' + # repositories: + # App\EventSourcing\TodoRepository: + # aggregate_type: App\EventSourcing\Todo + # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator + +services: + Prooph\Common\Messaging\MessageFactory: '@prooph_event_store.message_factory' diff --git a/prooph/event-store-symfony-bundle/0.4/manifest.json b/prooph/event-store-symfony-bundle/0.4/manifest.json new file mode 100644 index 000000000..047bbf30f --- /dev/null +++ b/prooph/event-store-symfony-bundle/0.4/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} diff --git a/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml b/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml new file mode 100644 index 000000000..0e460a9e5 --- /dev/null +++ b/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml @@ -0,0 +1,8 @@ +prooph_event_store: + stores: + app: + event_store: 'Prooph\EventStore\EventStore' + # repositories: + # App\EventSourcing\TodoRepository: + # aggregate_type: App\EventSourcing\Todo + # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator diff --git a/prooph/event-store-symfony-bundle/0.5/manifest.json b/prooph/event-store-symfony-bundle/0.5/manifest.json new file mode 100644 index 000000000..047bbf30f --- /dev/null +++ b/prooph/event-store-symfony-bundle/0.5/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} diff --git a/prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_event_store.yaml b/prooph/pdo-event-store/1.7/config/package/pdo_event_store.yml similarity index 64% rename from prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_event_store.yaml rename to prooph/pdo-event-store/1.7/config/package/pdo_event_store.yml index 3810695c3..79691201d 100644 --- a/prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_event_store.yaml +++ b/prooph/pdo-event-store/1.7/config/package/pdo_event_store.yml @@ -1,12 +1,3 @@ -prooph_event_store: - stores: - app: - event_store: 'Prooph\EventStore\EventStore' - # repositories: - # App\EventSourcing\TodoRepository: - # aggregate_type: App\EventSourcing\Todo - # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator - services: _defaults: autowire: true @@ -14,7 +5,6 @@ services: Prooph\EventStore\EventStore: '@Prooph\EventStore\Pdo\MySqlEventStore' Prooph\EventStore\Pdo\PersistenceStrategy: '@Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy' - Prooph\Common\Messaging\MessageFactory: '@prooph_event_store.message_factory' PDO: class: \PDO diff --git a/prooph/pdo-event-sourcing-pack/1.0/manifest.json b/prooph/pdo-event-store/1.7/manifest.json similarity index 58% rename from prooph/pdo-event-sourcing-pack/1.0/manifest.json rename to prooph/pdo-event-store/1.7/manifest.json index a1a79865e..68e3fa397 100644 --- a/prooph/pdo-event-sourcing-pack/1.0/manifest.json +++ b/prooph/pdo-event-store/1.7/manifest.json @@ -1,8 +1,4 @@ { - "bundles": { - "Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"], - "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] - }, "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, diff --git a/prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_service_bus.yaml b/prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml similarity index 100% rename from prooph/pdo-event-sourcing-pack/1.0/config/packages/prooph_service_bus.yaml rename to prooph/service-bus-symfony-bundle/0.6/config/packages/prooph_service_bus.yaml diff --git a/prooph/service-bus-symfony-bundle/0.6/manifest.json b/prooph/service-bus-symfony-bundle/0.6/manifest.json new file mode 100644 index 000000000..f32f1893d --- /dev/null +++ b/prooph/service-bus-symfony-bundle/0.6/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "Prooph\\Bundle\\ServiceBus\\ProophServiceBusBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} From d218ca198e7fefbd652d665e07518beab3b6ce1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 22 Mar 2018 13:04:58 +0100 Subject: [PATCH 16/31] Renamed pdo event store config file --- .../pdo_event_store.yml => packages/prooph_pdo_event_store.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename prooph/pdo-event-store/1.7/config/{package/pdo_event_store.yml => packages/prooph_pdo_event_store.yaml} (100%) diff --git a/prooph/pdo-event-store/1.7/config/package/pdo_event_store.yml b/prooph/pdo-event-store/1.7/config/packages/prooph_pdo_event_store.yaml similarity index 100% rename from prooph/pdo-event-store/1.7/config/package/pdo_event_store.yml rename to prooph/pdo-event-store/1.7/config/packages/prooph_pdo_event_store.yaml From 10540242d627806951eb3d9da7adac6036ea242d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 22 Mar 2018 14:16:38 +0100 Subject: [PATCH 17/31] Copied database init scripts into config directory --- prooph/pdo-event-store/1.7/manifest.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prooph/pdo-event-store/1.7/manifest.json b/prooph/pdo-event-store/1.7/manifest.json index 68e3fa397..217b2d510 100644 --- a/prooph/pdo-event-store/1.7/manifest.json +++ b/prooph/pdo-event-store/1.7/manifest.json @@ -2,6 +2,9 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, + "copy-from-package": { + "scripts": "%CONFIG_DIR%" + }, "env": { "MYSQL_HOST": "127.0.0.1", "MYSQL_DBNAME": "event_streams", From ee6ef3a12287325407c77eadbf94570929f62901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 22 Mar 2018 15:09:25 +0100 Subject: [PATCH 18/31] Eased default stream creation --- .../0.4/manifest.json | 3 +- .../src/Command/CreateEventStreamCommand.php | 29 +++++++++++++++++++ .../0.5/manifest.json | 3 +- .../src/Command/CreateEventStreamCommand.php | 29 +++++++++++++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 prooph/event-store-symfony-bundle/0.4/src/Command/CreateEventStreamCommand.php create mode 100644 prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php diff --git a/prooph/event-store-symfony-bundle/0.4/manifest.json b/prooph/event-store-symfony-bundle/0.4/manifest.json index 047bbf30f..9dc52b312 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 000000000..801996007 --- /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 047bbf30f..9dc52b312 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 000000000..801996007 --- /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.'); + } +} From 1db9529e5e85477b749b12b21df5535075e047c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 22 Mar 2018 16:18:08 +0100 Subject: [PATCH 19/31] Dispatched persisted events on app event bus --- .../3.1/config/packages/prooph_event_store_bus_bridge.yaml | 7 +++++++ prooph/event-store-bus-bridge/3.1/manifest.json | 5 +++++ .../0.6/config/packages/prooph_service_bus.yaml | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 prooph/event-store-bus-bridge/3.1/config/packages/prooph_event_store_bus_bridge.yaml create mode 100644 prooph/event-store-bus-bridge/3.1/manifest.json 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 new file mode 100644 index 000000000..5c2151ae7 --- /dev/null +++ b/prooph/event-store-bus-bridge/3.1/config/packages/prooph_event_store_bus_bridge.yaml @@ -0,0 +1,7 @@ +services: + _defaults: + autowire: true + + Prooph\EventStoreBusBridge\EventPublisher: + tags: + - { name: 'prooph_event_store.app.plugin' } diff --git a/prooph/event-store-bus-bridge/3.1/manifest.json b/prooph/event-store-bus-bridge/3.1/manifest.json new file mode 100644 index 000000000..e164c6e63 --- /dev/null +++ b/prooph/event-store-bus-bridge/3.1/manifest.json @@ -0,0 +1,5 @@ +{ + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} 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 294e2b5ef..7b8d5b051 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 @@ -1,9 +1,12 @@ prooph_service_bus: command_buses: app_command_bus: ~ + event_buses: + app_event_bus: ~ services: _defaults: autowire: true Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' + Prooph\ServiceBus\EventBus: '@prooph_service_bus.app_event_bus' From 02c6dedf54b3b0789030500bc1389dc9e5a87796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 22 Mar 2018 16:50:28 +0100 Subject: [PATCH 20/31] Added configuration to setup TransactionManager --- .../config/packages/prooph_event_store_bus_bridge.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) 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 5c2151ae7..6cbce6f67 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 @@ -5,3 +5,12 @@ services: Prooph\EventStoreBusBridge\EventPublisher: tags: - { name: 'prooph_event_store.app.plugin' } + + # Uncomment these lines if your event store support transaction + # Read more: http://docs.getprooph.org/event-store/implementations/pdo_event_store/variants.html#3-2-1-2 + # + # Prooph\EventStore\TransactionalEventStore: '@Prooph\EventStore\EventStore' + # + # Prooph\EventStoreBusBridge\TransactionManager: + # tags: + # - { name: 'prooph_service_bus.app_command_bus.plugin' } From c48c336ef2fa19039f259fe658d3cb740765c24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Fri, 23 Mar 2018 10:14:04 +0100 Subject: [PATCH 21/31] Used comand bus lib interface for service id --- .../0.6/config/packages/prooph_service_bus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7b8d5b051..6365179bd 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 @@ -8,5 +8,5 @@ services: _defaults: autowire: true - Prooph\Bundle\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' + Prooph\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' Prooph\ServiceBus\EventBus: '@prooph_service_bus.app_event_bus' From 403a1fa4df66cdf7917d6dd65249d13537c0d757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Fri, 23 Mar 2018 11:48:49 +0100 Subject: [PATCH 22/31] Increased explicitness of service definitions --- .../prooph_event_store_bus_bridge.yaml | 15 ++++++---- .../config/packages/prooph_event_store.yaml | 9 ++++-- .../config/packages/prooph_event_store.yaml | 8 ----- .../0.5/manifest.json | 9 ------ .../src/Command/CreateEventStreamCommand.php | 29 ------------------- .../packages/prooph_pdo_event_store.yaml | 18 +++++------- .../config/packages/prooph_service_bus.yaml | 9 +++--- 7 files changed, 27 insertions(+), 70 deletions(-) delete mode 100644 prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml delete mode 100644 prooph/event-store-symfony-bundle/0.5/manifest.json delete mode 100644 prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php 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 6cbce6f67..aaa9fc141 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 @@ -1,16 +1,19 @@ services: _defaults: - autowire: true + public: false Prooph\EventStoreBusBridge\EventPublisher: + arguments: + - '@prooph_service_bus.default_event_bus' tags: - - { name: 'prooph_event_store.app.plugin' } + - { name: 'prooph_event_store.default.plugin' } - # Uncomment these lines if your event store support transaction + # 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\EventStore\TransactionalEventStore: '@Prooph\EventStore\EventStore' - # # Prooph\EventStoreBusBridge\TransactionManager: + # arguments: + # - '@app.event_store.default' # tags: - # - { name: 'prooph_service_bus.app_command_bus.plugin' } + # - { 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 72f083ae3..01620ed22 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 @@ -1,11 +1,14 @@ prooph_event_store: stores: - app: - event_store: 'Prooph\EventStore\EventStore' + default: + event_store: 'app.event_store.default' # repositories: # App\EventSourcing\TodoRepository: # aggregate_type: App\EventSourcing\Todo # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator services: - Prooph\Common\Messaging\MessageFactory: '@prooph_event_store.message_factory' + _defaults: + public: false + + Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator: ~ diff --git a/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml b/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml deleted file mode 100644 index 0e460a9e5..000000000 --- a/prooph/event-store-symfony-bundle/0.5/config/packages/prooph_event_store.yaml +++ /dev/null @@ -1,8 +0,0 @@ -prooph_event_store: - stores: - app: - event_store: 'Prooph\EventStore\EventStore' - # repositories: - # App\EventSourcing\TodoRepository: - # aggregate_type: App\EventSourcing\Todo - # aggregate_translator: Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator diff --git a/prooph/event-store-symfony-bundle/0.5/manifest.json b/prooph/event-store-symfony-bundle/0.5/manifest.json deleted file mode 100644 index 9dc52b312..000000000 --- a/prooph/event-store-symfony-bundle/0.5/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "bundles": { - "Prooph\\Bundle\\EventStore\\ProophEventStoreBundle": ["all"] - }, - "copy-from-recipe": { - "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 deleted file mode 100644 index 801996007..000000000 --- a/prooph/event-store-symfony-bundle/0.5/src/Command/CreateEventStreamCommand.php +++ /dev/null @@ -1,29 +0,0 @@ -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/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 79691201d..2b8c08ba3 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 @@ -1,22 +1,20 @@ services: _defaults: - autowire: true public: false - Prooph\EventStore\EventStore: '@Prooph\EventStore\Pdo\MySqlEventStore' - Prooph\EventStore\Pdo\PersistenceStrategy: '@Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy' + 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' - PDO: + app.event_store.pdo_connection.mysql: class: \PDO arguments: - 'mysql:host=%env(MYSQL_HOST)%;dbname=%env(MYSQL_DBNAME)%' - '%env(MYSQL_USER)%' - '%env(MYSQL_PASSWORD)%' - Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy: + app.event_store.mysql.persistence_strategy: class: Prooph\EventStore\Pdo\PersistenceStrategy\MySqlSingleStreamStrategy - - Prooph\EventStore\Pdo\MySqlEventStore: - class: Prooph\EventStore\Pdo\MySqlEventStore - - Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator: ~ 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 6365179bd..ec36725ec 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 @@ -1,12 +1,11 @@ prooph_service_bus: command_buses: - app_command_bus: ~ + default_command_bus: ~ event_buses: - app_event_bus: ~ + default_event_bus: ~ services: _defaults: - autowire: true + public: false - Prooph\ServiceBus\CommandBus: '@prooph_service_bus.app_command_bus' - Prooph\ServiceBus\EventBus: '@prooph_service_bus.app_event_bus' + Prooph\ServiceBus\CommandBus: '@prooph_service_bus.default_command_bus' From 2385bdcf4cbdb67c289560cf53b57b612b9b02f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Fri, 23 Mar 2018 11:49:52 +0100 Subject: [PATCH 23/31] Added a default query bus --- .../0.6/config/packages/prooph_service_bus.yaml | 2 ++ 1 file changed, 2 insertions(+) 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 ec36725ec..faaa0df42 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 @@ -3,6 +3,8 @@ prooph_service_bus: default_command_bus: ~ event_buses: default_event_bus: ~ + query_buses: + default_query_bus: ~ services: _defaults: From e167532f35f97aab2f3a859e2b1bf2cd9eba6a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Fri, 23 Mar 2018 11:50:01 +0100 Subject: [PATCH 24/31] Added hint to auto register command handlers --- .../0.6/config/packages/prooph_service_bus.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 faaa0df42..c3475381e 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,3 +11,15 @@ 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 } From 62321969e42b9dd3db5dae206d3527150d946d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Fri, 23 Mar 2018 11:50:18 +0100 Subject: [PATCH 25/31] Added post installation hints --- prooph/pdo-event-store/1.7/post-install.txt | 5 +++++ prooph/service-bus-symfony-bundle/0.6/post-install.txt | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 prooph/pdo-event-store/1.7/post-install.txt create mode 100644 prooph/service-bus-symfony-bundle/0.6/post-install.txt diff --git a/prooph/pdo-event-store/1.7/post-install.txt b/prooph/pdo-event-store/1.7/post-install.txt new file mode 100644 index 000000000..7e2ecd5f5 --- /dev/null +++ b/prooph/pdo-event-store/1.7/post-install.txt @@ -0,0 +1,5 @@ + + MySql Event Store Configuration + + + * Modify your MYSQL_* configuration in .env diff --git a/prooph/service-bus-symfony-bundle/0.6/post-install.txt b/prooph/service-bus-symfony-bundle/0.6/post-install.txt new file mode 100644 index 000000000..ba6ab952e --- /dev/null +++ b/prooph/service-bus-symfony-bundle/0.6/post-install.txt @@ -0,0 +1,9 @@ + + Service Bus Configuration + + + * Verify and uncomment the configuration in %CONFIG_DIR%/packages/prooph_service_bus.yaml + to register message handlers + + * Dispatch commands by injecting + the Prooph\ServiceBus\CommandBus service into your controllers From f45406ffcd5e5106895d81bd098123ddf3ed95b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Fri, 23 Mar 2018 12:24:03 +0100 Subject: [PATCH 26/31] Fixed PDO event store SQL scripts copy --- prooph/pdo-event-store/1.7/manifest.json | 2 +- prooph/pdo-event-store/1.7/post-install.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/prooph/pdo-event-store/1.7/manifest.json b/prooph/pdo-event-store/1.7/manifest.json index 217b2d510..3cb259522 100644 --- a/prooph/pdo-event-store/1.7/manifest.json +++ b/prooph/pdo-event-store/1.7/manifest.json @@ -3,7 +3,7 @@ "config/": "%CONFIG_DIR%/" }, "copy-from-package": { - "scripts": "%CONFIG_DIR%" + "scripts/": "%CONFIG_DIR%/scripts/" }, "env": { "MYSQL_HOST": "127.0.0.1", diff --git a/prooph/pdo-event-store/1.7/post-install.txt b/prooph/pdo-event-store/1.7/post-install.txt index 7e2ecd5f5..d3adb0f42 100644 --- a/prooph/pdo-event-store/1.7/post-install.txt +++ b/prooph/pdo-event-store/1.7/post-install.txt @@ -3,3 +3,6 @@ * Modify your MYSQL_* configuration in .env + + * Create event streams and projections tables using SQL scripts + in %CONFIG_DIR%/scripts/* From 00ba2ea88da938e4a9fa2f5d2881bd8665b88040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Sat, 24 Mar 2018 17:50:36 +0100 Subject: [PATCH 27/31] Fixed multi-package travis build `composer req` expect one or many packages separated by a space character as argument. This commit ensures the $PACKAGES variable does not contain a new line separated list. --- .travis.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ba817c15..289e699dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,12 @@ cache: matrix: fast_finish: true include: - - php: 7.1 - env: SKELETON_VERSION="^3.4" - - php: 7.1 - env: SKELETON_VERSION="^4.0" + - + php: 7.1 + env: SKELETON_VERSION="^3.4" + - + php: 7.1 + env: SKELETON_VERSION="^4.0" before_install: - phpenv config-rm xdebug.ini || true @@ -25,4 +27,4 @@ install: - composer config extra.symfony.allow-contrib true script: - - composer req "${PACKAGES}" + - composer req $(echo "$PACKAGES" | tr --delete '\n') From 3bf651b4bc4b8e14e659557dc927ae122fd23670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Sun, 13 May 2018 11:17:57 +0200 Subject: [PATCH 28/31] Reverted style change --- .travis.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 289e699dd..f4ad81b3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,12 +8,10 @@ cache: matrix: fast_finish: true include: - - - php: 7.1 - env: SKELETON_VERSION="^3.4" - - - php: 7.1 - env: SKELETON_VERSION="^4.0" + - php: 7.1 + env: SKELETON_VERSION="^3.4" + - php: 7.1 + env: SKELETON_VERSION="^4.0" before_install: - phpenv config-rm xdebug.ini || true From 838f441fd5bfbeada01fab2c24f5a53879833fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Tue, 19 Jun 2018 19:44:59 +0100 Subject: [PATCH 29/31] Reverted travis multi packages support --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f4ad81b3d..1ba817c15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,4 +25,4 @@ install: - composer config extra.symfony.allow-contrib true script: - - composer req $(echo "$PACKAGES" | tr --delete '\n') + - composer req "${PACKAGES}" 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 30/31] 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 aaa9fc141..ed23c389f 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 01620ed22..7e3176266 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 801996007..e74bd5ff6 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 @@ 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 @@ protected function configure() 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 2b8c08ba3..056aa2588 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 c3475381e..faaa0df42 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 } From 245e200a324a07e1d37b9a4c616d8b919f9980b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Tue, 26 Jun 2018 14:22:31 +0100 Subject: [PATCH 31/31] Reduced number of env vars --- .../1.7/config/packages/prooph_pdo_event_store.yaml | 2 +- prooph/pdo-event-store/1.7/manifest.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 056aa2588..fd2480cda 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 @@ -14,7 +14,7 @@ services: app.event_store.pdo_connection.mysql: class: \PDO arguments: - - 'mysql:host=%env(MYSQL_HOST)%;dbname=%env(MYSQL_DBNAME)%' + - '%env(MYSQL_DSN)%' - '%env(MYSQL_USER)%' - '%env(MYSQL_PASSWORD)%' diff --git a/prooph/pdo-event-store/1.7/manifest.json b/prooph/pdo-event-store/1.7/manifest.json index 3cb259522..2cf27ba35 100644 --- a/prooph/pdo-event-store/1.7/manifest.json +++ b/prooph/pdo-event-store/1.7/manifest.json @@ -6,8 +6,7 @@ "scripts/": "%CONFIG_DIR%/scripts/" }, "env": { - "MYSQL_HOST": "127.0.0.1", - "MYSQL_DBNAME": "event_streams", + "MYSQL_DSN": "mysql:host=127.0.0.1;dbname=event_streams", "MYSQL_USER": "user", "MYSQL_PASSWORD": "password" }