antidot-fw/doctrine

Antidot 框架 doctrine ORM 集成库

1.0.3 2021-02-04 20:52 UTC

This package is auto-updated.

Last update: 2024-08-30 01:11:41 UTC


README

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

使用 Doctrine ORMAntidot 框架 之间的集成库,通过 Roave PSR-11 Doctrine 工厂

要求

  • PHP ^7.4|^8.0 当前版本

安装

使用 composer 安装。

composer require antidot-fw/doctrine

Antidot 框架 Starter 中的默认配置

Doctrine 集成需要最小配置才能工作,默认使用 SimplifiedYamlDriver 配置。当你需要更复杂或更定制的配置时,可以按照 Doctrine 文档 实现,而不会出现任何问题。

# 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