Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Doctrine Message Repository for EventSauce.

Notifications You must be signed in to change notification settings

EventSaucePHP/DoctrineMessageRepository

Repository files navigation

Doctrine Message Repository for EventSauce

⚠️ This repository is abandoned in favor of the newer eventsauce/message-repository-for-doctrine library.

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: