Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ddd Doctrine Bridge Laravel Package

becklyn/ddd-doctrine-bridge

Doctrine ORM bridge for becklyn/ddd-core: provides event store and transaction manager implementations plus ORM mappings and a migration. Includes a DBAL type override to persist microsecond-precision event timestamps (MySQL/Oracle).

View on GitHub
Deep Wiki
Context7

becklyn/ddd-doctrine-bridge provides Doctrine ORM implementations for the event store and transaction manager interfaces found in becklyn/ddd-core. The library is independent from any technology platform other than Doctrine, but we also provide the becklyn/ddd-symfony-bridge library for use within a Symfony application.

How To

See becklyn/ddd-core documentation for how to use the components provided by the libraries.

Setting Up the Event Store

Without using the becklyn/ddd-symfony-bridge library you will have to integrate the event store with your application yourself. Aside from the event store implementation, this library provides Doctrine ORM mappings for it in both XML and annotation formats, as well as a Doctrine Migrations 3 migration to set up the database tables.

Microseconds in Event Timestamps

To have Doctrine ORM 2 persist microseconds in the database as part of the timestamp representing when an event has been raised, you need to register the DateTimeImmutableMicrosecondsType class with Doctrine DBAL as an override for the datetime_immutable type. It should ideally be done during bootstrapping, for example:

use Doctrine\DBAL\Types\Type;
Type::overrideType('datetime_immutable', 'Becklyn\Ddd\DateTime\Infrastructure\Doctrine\DateTimeImmutableMicrosecondsType'); 

Only MySQL and Oracle are currently supported. For MySQL, this should no longer be necessary with Doctrine ORM 3 as it should incorporate this feature natively. For Oracle, activating the \Becklyn\Ddd\DateTime\Infrastructure\Doctrine\MicrosecondsOracleSessionInit Doctrine listener is required as well.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity