Skip to content

antidot-framework/doctrine

Antidot Doctrine Integration

Latest Version on Packagist Scrutinizer Code Quality Code Coverage type-coverage Build Status

Integration library between Doctrine ORM and Antidot Framework using Roave PSR-11 Doctrine factories.

Requirements

  • PHP ^7.4|^8.0 for current

Install

Install using composer.

composer require antidot-fw/doctrine

Default Config in Antidot Framework Starter

Doctrine integration requires a minimum config to work, by default it is configured with the SimplifiedYamlDriver. When you need more complex or more custom config you can implement it without ani issues following doctrine docs.

# Example using PDOSqliteDriver, and allocating yaml files at `config/doctrine` 
# directory for `App\Domain\Model` namespace.
parameters:
  doctrine:
    connection:
      orm_default:
        driver_class: Doctrine\DBAL\Driver\PDOSqlite\Driver
        params:
          path: var/database.sqlite
    driver:
      orm_default:
        paths:
          config/doctrine: App\Domain\Model