This package contains extensions for Doctrine2 that hook into the facilities of Doctrine and offer new functionality or tools to use Doctrine2 more efficiently. This package contains mostly used behaviors which can be easily attached to your event system of Doctrine2 and handle the records being flushed in the behavioral way. List of extensions:
Doctrine Extensions alternatives and similar libraries
Based on the "Database" category.
Alternatively, view Doctrine Extensions alternatives based on common mentions on social networks and blogs.
Doctrine9.5 9.6 L3 Doctrine Extensions VS DoctrineDoctrine Object Relational Mapper (ORM)
Medoo9.0 3.3 Doctrine Extensions VS MedooThe lightweight PHP database framework to accelerate the development.
ProxyManager8.5 0.0 L5 Doctrine Extensions VS ProxyManager🎩✨🌈 OOP Proxy wrappers/utilities - generates and manages proxies of your objects
Eloquent8.2 7.8 L4 Doctrine Extensions VS Eloquent[READ ONLY] Subtree split of the Illuminate Database component (see laravel/framework)
Baum8.0 0.0 L4 Doctrine Extensions VS BaumBaum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.
Idiorm7.8 7.3 L4 Doctrine Extensions VS IdiormA lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.
RedBean7.8 8.0 L3 Doctrine Extensions VS RedBeanORM layer that creates models, config and database on the fly
Propel7.2 4.4 L3 Doctrine Extensions VS PropelPropel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
Doctrine2 BehaviorsDoctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
EasyDB5.7 1.3 Doctrine Extensions VS EasyDBEasy-to-use PDO wrapper for PHP projects.
Aura.Sql5.4 0.0 Doctrine Extensions VS Aura.SqlSQL database access through PDO.
Spot25.4 0.0 L5 Doctrine Extensions VS Spot2Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer
Aura.SqlQueryIndependent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
Atlas.Orm4.4 1.2 Doctrine Extensions VS Atlas.OrmA data mapper implementation for your persistence model in PHP.
ATK Data3.9 7.2 Doctrine Extensions VS ATK DataData Access PHP Framework for SQL & high-latency databases
Cake ORM3.3 0.0 L3 Doctrine Extensions VS Cake ORM[READ-ONLY] A flexible, lightweight and powerful Object-Relational Mapper for PHP, implemented using the DataMapper pattern. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp
Pomm3.3 0.0 L5 Doctrine Extensions VS PommPHP Object Model Manager for Postgresql
Elasticsearch Eloquent⚡️ Models like Eloquent for Elasticsearch.
Simple MySQLi Class1.8 3.9 L2 Doctrine Extensions VS Simple MySQLi Class:gem: Simple MySQLi Abstraction Layer + Doctrine/DBAL support
Corma1.4 0.0 L4 Doctrine Extensions VS CormaConvention-based Object-Relational Mapper
LDBA1.3 0.0 Doctrine Extensions VS LDBAHigh-performance, low-memory-footprint, single-file embedded database for key/value storage
PHP library access Firebase RESTful APIA working Firebase http client
Symfony-RDMHelps with the use of domain driven design & rich domain model in symfony / doctrine applications.
LazyRecord0.7 0.0 L3 Doctrine Extensions VS LazyRecordThe fast ORM for PHP. (This is a history repo, please visit maghead/maghead)
Clean code begins in your IDE with SonarLint
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Doctrine Extensions or a related project?
Doctrine Behavioral Extensions
This package contains extensions for Doctrine ORM and MongoDB ODM that offer new functionality or tools to use Doctrine more efficiently. These behaviors can be easily attached to the event system of Doctrine and handle the records being flushed in a behavioral way.
Doctrine Extensions 3.0 Released :tada:
3.0 focuses on refreshing this package for today's PHP. This includes:
- Bumping minimum version requirements of PHP, Doctrine, and other dependencies
- Implementing support for the latest Doctrine MongoDB & Common packages
- Updating the test suite, add code and style standards, and other needed build tools
- Cleaning up documentation, code, comments, etc.
Read the Upgrade Doc for more info.
composer require gedmo/doctrine-extensions
ORM & MongoDB ODM
- Blameable - updates string or reference fields on create, update and even property change with a string or object (e.g. user).
- Loggable - helps tracking changes and history of objects, also supports version management.
- Sluggable - urlizes your specified fields into single unique slug
- Timestampable - updates date fields on create, update and even property change.
- Translatable - gives you a very handy solution for translating records into different languages. Easy to setup, easier to use.
- Tree - automates the tree handling process and adds some tree-specific functions on repository. (closure, nested set or materialized path) (MongoDB ODM only supports materialized path)
- IpTraceable - inherited from Timestampable, sets IP address instead of timestamp
- SoftDeleteable - allows to implicitly remove records
- Sortable - makes any document or entity sortable
- Uploadable - provides file upload handling in entity fields
MongoDB ODM Only
- References - supports linking Entities in Documents and vice versa
- ReferenceIntegrity - constrains ODM MongoDB Document references
All extensions support Attribute, Annotation and XML mapping. Additional mapping drivers can be easily implemented using Mapping extension to handle the additional metadata mapping.
|Extensions Version||Compatible Doctrine ORM & Common Library|
|2.3||2.2 - 2.4|
If you are setting up the Entity Manager without a framework, see the the example to prevent issues like #1310
XML mapping needs to be in a different namespace, the declared namespace for Doctrine extensions is http://gediminasm.org/schemas/orm/doctrine-extensions-mapping So root node now looks like this:
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"> ... </doctrine-mapping>
XML mapping xsd schemas are also versioned and can be used by version suffix:
- Latest version - http://gediminasm.org/schemas/orm/doctrine-extensions-mapping
- 2.2.x version - http://gediminasm.org/schemas/orm/doctrine-extensions-mapping-2-2
- 2.1.x version - http://gediminasm.org/schemas/orm/doctrine-extensions-mapping-2-1
To set up and run the tests, follow these steps:
- Install Docker and ensure you have
- From the project root, run
docker-compose up -dto start containers in daemon mode
- Enter the container via
docker-compose exec php bashand navigate to the root directory:
- Install Composer dependencies via
- Run the tests:
bin/phpunit -c tests/
Running the Example
To set up and run example, follow these steps:
- go to the root directory of extensions
- download composer:
- install dev libraries:
php composer.phar install
example/em.phpand configure your database on top of the file
php example/bin/consolefor console commands
php example/bin/console orm:schema-tool:createto create the schema
php example/bin/console app:print-category-translation-treeto run the example to print the category translation tree
Thanks to everyone participating in the development of these great Doctrine extensions!
And especially ones who create and maintain new extensions:
- Lukas Botsch lbotsch
- Gustavo Adrian comfortablynumb
- Boussekeyt Jules gordonslondon
- Kudryashov Konstantin everzet
- David Buchmann dbu