Download the PHP package actiane/entity-change-watch-bundle without Composer
On this page you can find all versions of the php package actiane/entity-change-watch-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download actiane/entity-change-watch-bundle
More information about actiane/entity-change-watch-bundle
Files in actiane/entity-change-watch-bundle
Package entity-change-watch-bundle
Short Description Allows you to listen to the life cycle of your entities
License MIT
Informations about the package entity-change-watch-bundle
EntityChangeWatchBundle
This bundle allow to watch changes made on specific properties of entities using the doctrine2 life cycles events
INSTALLATION
Create a yaml file inside the packages directory
USAGE
Examples
Callbacks services definition
All callback services must be tagged with
Callbacks method
Please note that the orders of the arguments matter
The first argument is the entity The second argument $changedProperties contains an array with all the changes applied to the entity. The third argument $$entityManager is the entityManager
A callback is called after the flush, you can not execute another flush in this method.
If you whish to add or modify entities, you need to set the flush parameter to false
If you create and persist a new entity in this callback, then calling EntityManager#persist() is not enough. You have to execute an additional call to $unitOfWork->computeChangeSet($classMetadata, $entity).
Changing primitive fields or associations requires you to explicitly trigger a re-computation of the changeset of the affected entity. This can be done by calling $unitOfWork->recomputeSingleEntityChangeSet($classMetadata, $entity).
All versions of entity-change-watch-bundle with dependencies
php Version >7.4
symfony/framework-bundle Version ^4.1|^5.1|^6.0
doctrine/orm Version ^2.7.0
doctrine/doctrine-bundle Version ^2.0
symfony/property-access Version ^4.1|^5.1|^6.0