PHPackages                             julienlinard/doctrine-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. julienlinard/doctrine-php

ActiveLibrary[Database &amp; ORM](/categories/database)

julienlinard/doctrine-php
=========================

Modern ORM for PHP 8+ inspired by Doctrine, with Entity Manager, Repository Pattern, Query Builder and PHP 8 Attributes mapping

1.2.0(4mo ago)131512MITPHPPHP &gt;=8.0

Since Dec 16Pushed 3mo agoCompare

[ Source](https://github.com/julien-lin/php-doctrine)[ Packagist](https://packagist.org/packages/julienlinard/doctrine-php)[ Docs](https://github.com/julien-lin/doctrine-php)[ RSS](/packages/julienlinard-doctrine-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (18)Used By (2)

Doctrine PHP - Modern ORM for PHP 8+
====================================

[](#doctrine-php---modern-orm-for-php-8)

[🇫🇷 Read in French](README.fr.md) | [🇬🇧 Read in English](README.md)

[![PHP Version](https://camo.githubusercontent.com/f32695bd6f65b12545162e869707d33dac6bcb5f6e5dc0d48b6d1f8162b6c247/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e302d626c75652e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Tests](https://camo.githubusercontent.com/853d34b79d2dee3e0159569a3e128f60055a5a0c356956bc0a07e62da7a8209b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d31343125323070617373696e672d627269676874677265656e2e737667)](tests/)

A modern, lightweight ORM (Object-Relational Mapping) for PHP 8+ inspired by Doctrine ORM. Features Entity Manager, Repository Pattern, Query Builder, and PHP 8 Attributes mapping with automatic optimizations.

✨ Features
----------

[](#-features)

- 🚀 **Entity Manager** - Complete entity lifecycle management
- 📦 **Repository Pattern** - Powerful repositories with CRUD methods
- 🔨 **Query Builder** - Fluent SQL query construction
- 🏷️ **PHP 8 Attributes** - Modern entity definition with attributes
- 🔗 **Relations** - OneToMany, ManyToOne, ManyToMany support
- 📊 **Migrations** - Automatic schema migration system with rollback
- 🔄 **Transactions** - Full transaction support with automatic rollback
- ⚡ **Performance** - Query cache, batch operations, N+1 optimization
- 📝 **Query Logging** - Built-in SQL query logging for debugging
- 🗄️ **Multi-DBMS** - MySQL, PostgreSQL, SQLite support

🚀 Quick Start
-------------

[](#-quick-start)

### Installation

[](#installation)

```
composer require julienlinard/doctrine-php
```

**Requirements**: PHP 8.0+ and PDO extension

### Basic Usage

[](#basic-usage)

```
