PHPackages                             actiane/entity-change-watch-bundle - 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. actiane/entity-change-watch-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

actiane/entity-change-watch-bundle
==================================

Allows you to listen to the life cycle of your entities

v2.5.0(3y ago)528.8k↓33.3%3MITPHPPHP &gt;7.4

Since Nov 24Pushed 3y ago3 watchersCompare

[ Source](https://github.com/actiane/EntityChangeWatchBundle)[ Packagist](https://packagist.org/packages/actiane/entity-change-watch-bundle)[ RSS](/packages/actiane-entity-change-watch-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (36)Used By (0)

EntityChangeWatchBundle
=======================

[](#entitychangewatchbundle)

[![travis build](https://camo.githubusercontent.com/b67ce1e5f5bdf5c0c8a1c14bf0028c8917864588aab1fe3866056eb3a4eee168/68747470733a2f2f7472617669732d63692e6f72672f61637469616e652f456e746974794368616e6765576174636842756e646c652e7376673f6272616e63683d76322e32)](https://travis-ci.org/actiane/EntityChangeWatchBundle)[![Coverage Status](https://camo.githubusercontent.com/0f5f5480f87bf09acfc1be7eec3b6e880ec9a406961eb8e562845db49c70f644/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f61637469616e652f456e746974794368616e6765576174636842756e646c652f62616467652e7376673f6272616e63683d76322e32)](https://coveralls.io/github/actiane/EntityChangeWatchBundle?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7460fbf178fe5fe615721f1865015df125176550b3d024a2fe44faa0d1025a16/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61637469616e652f456e746974794368616e6765576174636842756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d76322e32)](https://scrutinizer-ci.com/g/actiane/EntityChangeWatchBundle/?branch=master)

This bundle allow to watch changes made on specific properties of entities using the doctrine2 life cycles events

INSTALLATION
------------

[](#installation)

Create a yaml file inside the packages directory

USAGE
-----

[](#usage)

### Examples

[](#examples)

```
entity_change_watch:
    classes:
        Entity\MyEntity:
            create:
                - {name: 'MyEntityService', method: 'doSomethingBeforeFlush', flush: false}
            delete:
                - {name: 'MyEntityService', method: 'doSomething'}
            update:
                all:
                    - {name: 'MyEntityService', method: 'doSomething'}
                properties:
                    property1:
                        - {name: 'MyEntityService', method: 'doSomething'}
                    property2:
                        - {name: 'MyEntityService', method: 'doSomethingElse'}
```

```
class MyEntityService
{
    public function doSomething(MyEntity $myEntity)
    {
        /*

        do something
        */
    }

    public function doSomethingBeforeFlush(MyEntity $myEntity)
    {
        /*

        do something before the flush
        */
    }

    public function doSomethingElse(MyEntity $myEntity, array $changedProperties, EntityManagerInterface $entityManager)
    {
        /*

        do something else
        */
    }
```

### Callbacks services definition

[](#callbacks-services-definition)

All callback services must be tagged with `actiane.entitychangewatch.callback`

### Callbacks method

[](#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

```
 - {name: 'MyEntityService', method: 'doSomethingBeforeFlush', flush: 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).`

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 87% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~21 days

Total

35

Last Release

1381d ago

Major Versions

v1.1.1 → v2.0.02017-12-05

v1.1.x-dev → v2.0.32018-03-12

PHP version history (4 changes)v1.0.0PHP ^5.4|^7.0

v2.0.0PHP ^7.1

v2.3.0PHP ^7.4

2.4.0.x-devPHP &gt;7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f6e7a105f618d232f4efbdb5e7de91b6a9392c1c14dc8522e87774df967d103?d=identicon)[puget.e](/maintainers/puget.e)

---

Top Contributors

[![emilien-puget](https://avatars.githubusercontent.com/u/4057108?v=4)](https://github.com/emilien-puget "emilien-puget (47 commits)")[![nicolas-anaxago](https://avatars.githubusercontent.com/u/36852013?v=4)](https://github.com/nicolas-anaxago "nicolas-anaxago (6 commits)")[![remijanot-anaxago](https://avatars.githubusercontent.com/u/55976672?v=4)](https://github.com/remijanot-anaxago "remijanot-anaxago (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/actiane-entity-change-watch-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/actiane-entity-change-watch-bundle/health.svg)](https://phpackages.com/packages/actiane-entity-change-watch-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[hautelook/alice-bundle

Symfony bundle to manage fixtures with Alice and Faker.

19519.4M34](/packages/hautelook-alice-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1022.4k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
