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

Maintainers

Package info

github.com/coolms/entity-doctrine

pkg:composer/coolms/entity-doctrine

Transparency log

Statistics

Installs: 21

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-18 11:06 UTC

This package is auto-updated.

Last update: 2026-08-18 11:44:00 UTC


README

CI Latest Version PHP License

Doctrine ORM/DBAL adapters for coolms/entity. Provides the virtual package coolms/entity-persistence-implementation.

  • Mapping\ExtrasFieldMappingDriver -- decorates the central metadata driver to surface generated v_{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 -- enforces required extras 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 the EntitySchemaProviderInterface contract.

Installation

composer require coolms/entity-doctrine