From c9dfa6d8941bcd0dedf0f938c53d86fa7b59e4ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 7 Mar 2024 11:30:47 +0100 Subject: [PATCH] Use getObject event args member function instead of deprecated getEntity --- Entity/Civility.php | 2 +- Entity/Group.php | 2 +- Entity/User.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Entity/Civility.php b/Entity/Civility.php index 9ec56e9..ea8b95b 100644 --- a/Entity/Civility.php +++ b/Entity/Civility.php @@ -169,7 +169,7 @@ class Civility { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have a civility instance - if (($user = $eventArgs->getEntity()) instanceof Civility) { + if (($user = $eventArgs->getObject()) instanceof Civility) { //Set updated value $user->setUpdated(new \DateTime('now')); } diff --git a/Entity/Group.php b/Entity/Group.php index 901fbc6..aa60f77 100644 --- a/Entity/Group.php +++ b/Entity/Group.php @@ -169,7 +169,7 @@ class Group { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have a group instance - if (($user = $eventArgs->getEntity()) instanceof Group) { + if (($user = $eventArgs->getObject()) instanceof Group) { //Set updated value $user->setUpdated(new \DateTime('now')); } diff --git a/Entity/User.php b/Entity/User.php index 68b0dcf..7d15a36 100644 --- a/Entity/User.php +++ b/Entity/User.php @@ -432,7 +432,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have an user instance - if (($user = $eventArgs->getEntity()) instanceof User) { + if (($user = $eventArgs->getObject()) instanceof User) { //Set updated value $user->setUpdated(new \DateTime('now')); } -- 2.41.1