talira

Doctrine ORM

Object-relational mapper for PHP

open sourceMITfree

Doctrine ORM maps PHP objects to relational database tables, built on Doctrine DBAL, its database abstraction layer. Entities are plain PHP classes described with attributes or XML, a unit of work tracks changes and writes them in one transaction, and DQL, an object query language, and a query builder run queries against your entities. Doctrine Bundle integrates it with Symfony, a module does the same for Laminas, and Doctrine Migrations and Data Fixtures handle schema changes and test data. It's the Doctrine Project's main library, MIT licensed, with 3.8 the stable series and 2.20 on security fixes.

Problems it solves

  • map my PHP classes to database tables without writing SQL for every query
  • use an ORM in my Symfony app
  • switch databases in a PHP app without rewriting queries

Features

  • entities as plain PHP classes mapped with attributes or XML
  • unit of work that writes changes in one transaction
  • DQL object query language and a query builder
  • built on Doctrine DBAL's database abstraction layer
  • Symfony integration through Doctrine Bundle, and a Laminas module