Doctrine EntityListener Pills: Comparing old and new values when updating data
You all, at some point, faced the necessity to compare old and new values when storing an entity. Here is where Doctrine EntityListener comes at help. Let imagine you have this User entity
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<?php namespace App/Entity; class User { /** @var string $email */ private $email; public function getEmail(): string { return $this->email; } } |
and you want to notify the…