Skip to content

Reference

phil/ddd-bundle

Every public type of the bundle, by layer. All are implemented and tested unless the state says otherwise.

Phil\DddBundle\Domain

Depends on symfony/uid only.

TypeKindRoleState
Identifier\Identifierabstract readonly class, StringableBase of aggregate identifiers: UUIDv7, generate(), fromString(), equals() by class and value, toString()Implemented
Event\DomainEventinterfaceA past fact inside a context: occurredAt()Implemented
Exception\DomainErrorinterface, extends ThrowableWhat the domain throwsImplemented
Exception\InvalidValuefinal class, InvalidArgumentException and DomainErrorA value object refused its construction: because(string $reason)Implemented

Phil\DddBundle\Application

TypeKindRoleState
Bus\Commandmarker interfaceAn intention to change state; returns nothingImplemented
Bus\Querymarker interface, @template TResultA question asked of the read modelImplemented
Bus\CommandBusportdispatch(Command): void, throws DomainErrorImplemented
Bus\QueryBusportask(Query): mixed, typed TResultImplemented
Bus\CommandHandlerautoconfiguration markerTags the handler on the command busImplemented
Bus\QueryHandlerautoconfiguration markerTags the handler on the query busImplemented

Phil\DddBundle\Infrastructure

TypeKindRoleState
Messenger\MessengerCommandBusfinal readonly class, CommandBusDispatches on the configured Messenger bus; unwraps the first DomainErrorImplemented
Messenger\MessengerQueryBusfinal class, QueryBusDispatches on the configured Messenger bus; returns the one handler's result; unwraps any handler failureImplemented
Doctrine\IdentifierTypeabstract class, DBAL Type, @template T of IdentifierColumn type of one identifier class: native UUID or 16-byte binaryImplemented; optional, needs doctrine/dbal 4.2 or later

The bundle

TypeKindRoleState
PhilDddBundlefinal class, AbstractBundleConfiguration alias phil_ddd; wires the two adapters, their aliases and the marker autoconfigurationImplemented

Not in the code yet

PartState
Recording domain events on aggregates and dispatching them after the flush, inside the transactionNot started
Documented Messenger inbox configuration for consumers of integration eventsNot started

See configuration.md for the services and tags, and out-of-scope.md for what the bundle will not contain.