Wallogit.com
2017 © Pedro Peláez
Add Doctrine events
Add some events to Doctrine 2.5, (*2)
Fix a Doctrine UnitOfwork bug with extraUpdates, who are not removed when you add and remove your entity before calling flush(), (*3)
Changelog, (*4)
Dispatched when UnitOfWork try to know if current entity must be filled with values retrieved from query, or if this entity is already known and fields are already defined., (*5)
Dispactched when UnitOfWork define entity field values, (*6)
Dispactched when UnitOfWork create new instance of your Entity, (*7)
Add it to your composer.json :, (*8)
{
"require": {
"steevanb/doctrine-events": "^1.2",
}
}
You have to use steevanb\DoctrineEvents\Doctrine\ORM\EntityManager instead of Doctrine\ORM\EntityManager, (*9)
Internally, it will use steevanb\DoctrineEvents\Doctrine\ORM\UnitOfWork instead of Doctrine\ORM\UnitOfWork, (*10)
If you are on Symfony2 or Symfony3 project, you can add it to your config :, (*11)
# app/config.yml
parameters:
doctrine.orm.entity_manager.class: steevanb\DoctrineEvents\Doctrine\ORM\EntityManager
https://github.com/steevanb/doctrine-entity-merger : add MERGE_ENTITY hint to define fields loaded with multiple queries, with PARTIAL, instead of returning first hydrated entity, (*12)