PHP ORM Libraries

PHP ORM Libraries

PHP ORM libraries provide features specialized for web application development. Eloquent is popular as part of the Laravel framework, Doctrine is the most comprehensive and powerful ORM, and Propel features XML-based configuration. The Active Record pattern is widely adopted, providing intuitive APIs.

GitHub Star Comparison

PHP ORM Libraries GitHub Star Comparison
NoNameGitHub StarsDescriptionTrendLicenseTypeOfficial Site
1Laravel Eloquent⭐ 33.8kLaravel Eloquent is the Active Record implementation ORM of the Laravel framework. It enables intuitive database operations through elegant and fluent API, providing rich features including relationships, events, accessors/mutators, and more.stableMITLibrary-
2Illuminate Database (Laravel Eloquent)⭐ 33.8kIlluminate Database, developed as part of the Laravel framework, is "an elegant and expressive Active Record implementation" and the most popular ORM library in PHP. Adopting the simple Active Record pattern, it provides an intuitive mapping between database tables and model classes. Combined with a powerful query builder, it enables complex database operations without writing SQL queries. It comprehensively provides features necessary for modern web development including relationships, migrations, seeding, and soft deletes, significantly improving developer productivity.stableMITLibrary-
3Laravel Eloquent⭐ 33.8kLaravel Eloquent is the core ActiveRecord ORM of the Laravel framework. Following a "convention over configuration" approach, it provides database operations through an intuitive and fluent interface, delivering an excellent developer experience. It automatically infers relationships between models and database tables based on conventions, enabling complex SQL queries to be expressed in concise, readable PHP code. With comprehensive built-in features like migrations, relationships, events, accessors/mutators, and deep integration with the Laravel ecosystem, it maximizes development efficiency for web applications.stableMITLibrary-
4Doctrine ORM⭐ 10.1kDoctrine ORM is a high-featured ORM library for PHP that provides "transparent persistence for PHP objects." It features a metadata system that maps entities to database tables, comprehensive association management including One-to-One, One-to-Many, and Many-to-Many relationships, and flexible mapping definitions using PHP 8+ attributes, XML, or PHP code. With high performance through metadata cache, query cache, and result cache, lazy loading via proxy objects, and advanced query processing through DQL, it strongly supports enterprise-level PHP application development.stableMITLibrary-
5Propel⭐ 1.3kPropel is "a fast, open-source ORM for PHP" developed as an Object-Relational Mapping library for SQL databases compatible with PHP 8. It enables simple data storage and retrieval through a simple API, implementing important ORM layer concepts including ActiveRecord patterns, validators, behaviors, table inheritance, reverse engineering of existing databases, nested sets, nested transactions, lazy loading, and LOBs. It supports MySQL, PostgreSQL, SQLite, MSSQL, and Oracle for compatibility, with a design that emphasizes flexibility and extensibility.stableMITLibrary-
6Cycle ORM⭐ 1.3kCycle ORM is a next-generation Object-Relational Mapping (ORM) library for PHP, featuring flexible design that supports both traditional ActiveRecord and DataMapper patterns. It integrates powerful schema builder, automatic migration, relationship mapping, and query builder functionality, while automating SQL injection prevention and data integrity assurance. Supporting major databases including MySQL, PostgreSQL, SQLite, and SQL Server, it provides a modern PHP ORM solution for building high-performance data access layers.stableMITLibraryOfficial
7Spot⭐ 600Spot is "Simple PHP ORM" that serves as a lightweight and simple Object-Relational Mapping (ORM) library for PHP applications. Designed as an alternative to the heavyweight nature of Doctrine ORM, it supports both Active Record and DataMapper patterns while providing an intuitive API with low learning costs. It realizes modern ORM features such as migration functionality, relationship management, and query builders in a lightweight package, making it an optimal choice for small to medium-scale PHP projects.stableMITLibrary-