coolms / entity-doctrine
Doctrine ORM/DBAL adapters for coolms/entity: the extras mapping driver and validation listener, generated virtual columns, per-platform schema and upsert managers, and tree operators
Requires
- php: ^8.5
- coolms/core: ^2.0
- coolms/entity: ^2.0
- coolms/rql: ^1.0
- doctrine/dbal: ^4.0
- doctrine/doctrine-bundle: ^3.2
- doctrine/orm: ^3.0
- doctrine/persistence: ^4.0
- psr/cache: ^3.0
- psr/log: ^3.0
- symfony/cache: ^8.0
- symfony/console: ^8.0
- symfony/doctrine-bridge: ^8.0
- symfony/event-dispatcher: ^8.0
- symfony/http-kernel: ^8.0
- symfony/messenger: ^8.0
- symfony/security-bundle: ^8.0
- symfony/uid: ^8.0
Requires (Dev)
- phpunit/phpunit: ^12.5
Suggests
None
Provides
Conflicts
- coolms/entity: <=2.0.0-alpha2
Replaces
None
This package is auto-updated.
Last update: 2026-09-15 22:39:47 UTC
README
Doctrine ORM/DBAL adapters for coolms/entity.
Provides the virtual package coolms/entity-persistence-implementation.
⚠️
provideis a placeholder, as of 2026-09-16. Declared; read by Composer's resolver alone, whencoolms/entity-applicationasks for the virtual name (a consumer must name this package -- Composer will not pick a provider by itself); read by no code. No selector exists and no second adapter exists: Doctrine is the only persistence today, and a second (Cycle, or an in-house ORM) is intended rather than planned. And for THIS family the manifest promises more than the code keeps:coolms/entity-bundleimports eleven classes of this package by name -- in its DI extension and two compiler passes -- so providing the same virtual name would not be enough to substitute; the bundle would have to change with it. The line becomes live when a second adapter exists AND the wiring moves into the adapter, the waycoolms/core-doctrineships its own bundle andcoolms/core-bundleimports nothing of it. Until then the true property of this package is narrower and still worth having:coolms/entityitself imports noDoctrine\ORM\orDoctrine\DBAL\class, so replacing the ORM would not touch the domain.
Mapping\ExtrasFieldMappingDriver-- decorates the central metadata driver to surface generatedv_{name}virtual columns, so extras fields are filterable and sortable through an index rather than a JSON scan. Uses a DBAL connection rather than an ORM repository, because the ORM needs metadata to boot.Mapping\TraitMappingDriver-- reads column attributes declared on traits.Listener\ExtrasValidationListener-- enforcesrequiredextras fields on persist and update. Opt-in per alias: enforcing an alias rejects writes that succeeded before, so it is a data migration rather than a flag flip.Schema\Platform\*,Upsert\Platform\*-- per-platform DDL and upsert emitters (PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle).Tree\*-- nested-set and materialized-path operators. Registered explicitly per consuming module: the constructors take the entity class and tree expressions, which autowiring cannot fill.Repository\DoctrineEntitySchemaProvider-- the only class that reads Doctrine ORM metadata for entity introspection; everything above it depends on theEntitySchemaProviderInterfacecontract.
Installation
composer require coolms/entity-doctrine