|
45 | 45 | use Patchlevel\EventSourcing\Console\Command\WatchCommand; |
46 | 46 | use Patchlevel\EventSourcing\Console\DoctrineHelper; |
47 | 47 | use Patchlevel\EventSourcing\Cryptography\DoctrineCipherKeyStore; |
48 | | -use Patchlevel\EventSourcing\DCB\AttributeEventTagExtractor; |
49 | | -use Patchlevel\EventSourcing\DCB\DecisionModelBuilder; |
50 | | -use Patchlevel\EventSourcing\DCB\EventAppender; |
51 | | -use Patchlevel\EventSourcing\DCB\EventTagExtractor; |
52 | | -use Patchlevel\EventSourcing\DCB\StoreDecisionModelBuilder; |
53 | | -use Patchlevel\EventSourcing\DCB\StoreEventAppender; |
54 | 48 | use Patchlevel\EventSourcing\EventBus\AttributeListenerProvider; |
55 | 49 | use Patchlevel\EventSourcing\EventBus\Consumer; |
56 | 50 | use Patchlevel\EventSourcing\EventBus\DefaultConsumer; |
|
76 | 70 | use Patchlevel\EventSourcing\QueryBus\QueryBus; |
77 | 71 | use Patchlevel\EventSourcing\Repository\DefaultRepositoryManager; |
78 | 72 | use Patchlevel\EventSourcing\Repository\MessageDecorator\ChainMessageDecorator; |
79 | | -use Patchlevel\EventSourcing\Repository\MessageDecorator\EventTagDecorator; |
80 | 73 | use Patchlevel\EventSourcing\Repository\MessageDecorator\MessageDecorator; |
81 | 74 | use Patchlevel\EventSourcing\Repository\MessageDecorator\SplitStreamDecorator; |
82 | 75 | use Patchlevel\EventSourcing\Repository\RepositoryManager; |
|
103 | 96 | use Patchlevel\EventSourcing\Store\Store; |
104 | 97 | use Patchlevel\EventSourcing\Store\StreamDoctrineDbalStore; |
105 | 98 | use Patchlevel\EventSourcing\Store\StreamReadOnlyStore; |
106 | | -use Patchlevel\EventSourcing\Store\TaggableDoctrineDbalStore; |
107 | 99 | use Patchlevel\EventSourcing\Subscription\Engine\CatchUpSubscriptionEngine; |
108 | 100 | use Patchlevel\EventSourcing\Subscription\Engine\DefaultSubscriptionEngine; |
109 | 101 | use Patchlevel\EventSourcing\Subscription\Engine\GapResolverStoreMessageLoader; |
@@ -198,7 +190,6 @@ public function load(array $configs, ContainerBuilder $container): void |
198 | 190 | $this->configureMigration($config, $container); |
199 | 191 | $this->configureValueResolver($container); |
200 | 192 | $this->configureStoreMigration($config, $container); |
201 | | - $this->configureDCB($config, $container); |
202 | 193 | } |
203 | 194 |
|
204 | 195 | /** @param Config $config */ |
@@ -241,9 +232,6 @@ private function configureSerializer(array $config, ContainerBuilder $container) |
241 | 232 | ]); |
242 | 233 |
|
243 | 234 | $container->setAlias(HeadersSerializer::class, DefaultHeadersSerializer::class); |
244 | | - |
245 | | - $container->register(AttributeEventTagExtractor::class); |
246 | | - $container->setAlias(EventTagExtractor::class, AttributeEventTagExtractor::class); |
247 | 235 | } |
248 | 236 |
|
249 | 237 | /** @param Config $config */ |
@@ -641,10 +629,6 @@ private function configureMessageDecorator(ContainerBuilder $container): void |
641 | 629 | ->setArguments([new Reference(EventMetadataFactory::class)]) |
642 | 630 | ->addTag('event_sourcing.message_decorator'); |
643 | 631 |
|
644 | | - $container->register(EventTagDecorator::class) |
645 | | - ->setArguments([new Reference(EventTagExtractor::class)]) |
646 | | - ->addTag('event_sourcing.message_decorator'); |
647 | | - |
648 | 632 | $container->registerForAutoconfiguration(MessageDecorator::class) |
649 | 633 | ->addTag('event_sourcing.message_decorator'); |
650 | 634 |
|
@@ -772,27 +756,6 @@ private function configureStore(array $config, ContainerBuilder $container): voi |
772 | 756 | return; |
773 | 757 | } |
774 | 758 |
|
775 | | - if ($config['store']['type'] === 'dbal_taggable') { |
776 | | - $container->register(TaggableDoctrineDbalStore::class) |
777 | | - ->setArguments([ |
778 | | - new Reference('event_sourcing.dbal_connection'), |
779 | | - new Reference(EventSerializer::class), |
780 | | - new Reference(EventRegistry::class), |
781 | | - new Reference(HeadersSerializer::class), |
782 | | - new Reference('event_sourcing.clock'), |
783 | | - $config['store']['options'], |
784 | | - ]) |
785 | | - ->addTag('event_sourcing.doctrine_schema_configurator'); |
786 | | - |
787 | | - $container->setAlias(Store::class, TaggableDoctrineDbalStore::class); |
788 | | - |
789 | | - if ($config['store']['read_only']) { |
790 | | - throw new InvalidArgumentException('Taggable store does not support read only'); |
791 | | - } |
792 | | - |
793 | | - return; |
794 | | - } |
795 | | - |
796 | 759 | throw new InvalidArgumentException(sprintf('Unknown store type "%s"', $config['store']['type'])); |
797 | 760 | } |
798 | 761 |
|
@@ -859,20 +822,6 @@ private function configureStoreMigration(array $config, ContainerBuilder $contai |
859 | 822 | return; |
860 | 823 | } |
861 | 824 |
|
862 | | - if ($config['store']['migrate_to_new_store']['type'] === 'dbal_taggable') { |
863 | | - $container->register($id, TaggableDoctrineDbalStore::class) |
864 | | - ->setArguments([ |
865 | | - new Reference('event_sourcing.dbal_connection'), |
866 | | - new Reference(EventSerializer::class), |
867 | | - new Reference(HeadersSerializer::class), |
868 | | - new Reference('event_sourcing.clock'), |
869 | | - $config['store']['migrate_to_new_store']['options'], |
870 | | - ]) |
871 | | - ->addTag('event_sourcing.doctrine_schema_configurator'); |
872 | | - |
873 | | - return; |
874 | | - } |
875 | | - |
876 | 825 | throw new InvalidArgumentException(sprintf('Unknown store type "%s"', $config['store']['type'])); |
877 | 826 | } |
878 | 827 |
|
@@ -1224,31 +1173,6 @@ private function configureCryptography(array $config, ContainerBuilder $containe |
1224 | 1173 | $container->setAlias(PayloadCryptographer::class, PersonalDataPayloadCryptographer::class); |
1225 | 1174 | } |
1226 | 1175 |
|
1227 | | - /** @param Config $config */ |
1228 | | - private function configureDCB(array $config, ContainerBuilder $container): void |
1229 | | - { |
1230 | | - if (!$config['dcb']['enabled']) { |
1231 | | - return; |
1232 | | - } |
1233 | | - |
1234 | | - if ($config['store']['type'] !== 'dbal_taggable') { |
1235 | | - throw new InvalidArgumentException( |
1236 | | - 'DCB requires a taggable store, please use "dbal_taggable" as store type.', |
1237 | | - ); |
1238 | | - } |
1239 | | - |
1240 | | - $container->register(StoreDecisionModelBuilder::class) |
1241 | | - ->setArguments([new Reference(TaggableDoctrineDbalStore::class)]); |
1242 | | - $container->setAlias(DecisionModelBuilder::class, StoreDecisionModelBuilder::class); |
1243 | | - |
1244 | | - $container->register(StoreEventAppender::class) |
1245 | | - ->setArguments([ |
1246 | | - new Reference(TaggableDoctrineDbalStore::class), |
1247 | | - new Reference(EventTagExtractor::class), |
1248 | | - ]); |
1249 | | - $container->setAlias(EventAppender::class, StoreEventAppender::class); |
1250 | | - } |
1251 | | - |
1252 | 1176 | private function configureValueResolver(ContainerBuilder $container): void |
1253 | 1177 | { |
1254 | 1178 | $container->register(AggregateRootIdValueResolver::class) |
|
0 commit comments