eventsauce/doctrine-message-repository

Doctrine Message Repository for EventSauce

0.8.3 2021-01-14 21:06 UTC

This package is auto-updated.

Last update: 2021-01-17 08:11:10 UTC


README

use Doctrine\DBAL\Connection;
use EventSauce\DoctrineMessageRepository\DoctrineMessageRepository;
use EventSauce\EventSourcing\Serialization\MessageSerializer;

/** @var Connection $doctrineConnection */
$doctrineConnection = setup_doctrine_connection();
/** @var MessageSerializer $messageSerializer */
$messageSerializer = setup_message_serializer();
$messageRepository = new DoctrineMessageRepository(
    $doctrineConnection,
    $messageSerializer,
    'your_table_name',
);

Next step: Use it when bootstrapping your aggregate root repository

For the schema used for this repository, see: