PHPackages                             mima/doctrine-entity-changes - 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. mima/doctrine-entity-changes

ActiveLibrary[Database &amp; ORM](/categories/database)

mima/doctrine-entity-changes
============================

Libraries for collecting all changes in doctrine entities and relations

v1.1.0(5y ago)14MITPHPPHP &gt;=7.1CI failing

Since May 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/MimaTomis/doctrine-entity-changes)[ Packagist](https://packagist.org/packages/mima/doctrine-entity-changes)[ RSS](/packages/mima-doctrine-entity-changes/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Doctrine Entity Changes
=======================

[](#doctrine-entity-changes)

[![Build Status](https://camo.githubusercontent.com/3188b9eb743d1c4789520af55d02bee9b9d544cdb7c1a010adc056636a9bf3ef/68747470733a2f2f7472617669732d63692e6f72672f4d696d61546f6d69732f646f637472696e652d656e746974792d6368616e6765732e737667)](https://travis-ci.org/MimaTomis/doctrine-entity-changes)

Library makes it easy to get changes of Doctrine entities.

- [Installation](#installation)
- [How to use](#how-to-use)
    - [Simple way to get changes](#simple-way-to-get-changes)
    - [Collect changes](#collect-changes)
    - [Field iteration](#field-iteration)
        - [Abstract visitors](#abstract-visitors)
        - [Visitor with callback](#visitor-with-callback)
        - [Full implementation of visitor](#full-implementation-of-visitor)
    - [Getting field name](#getting-field-name)
    - [Getting relation changes](#getting-relation-changes)
    - [Apply visitor to concrete field](#apply-visitor-to-concrete-field)
- [How to help](#how-to-help)

Installation
------------

[](#installation)

Run command:

```
composer require mima/doctrine-entity-changes
```

Add dependency to your composer.json:

```
{
    "require": {
        "mima/doctrine-entity-changes": "~1.0"
    }
}
```

How to use
----------

[](#how-to-use)

*Note that getting changes must be earlier then flush.*For example, declare entity class:

```
