⚠️ This repository is abandoned in favor of the newereventsauce/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: