From 39342c5f94d2236d17aa6e120f1c4d467365f159 Mon Sep 17 00:00:00 2001 From: royalphp Date: Sun, 22 Feb 2026 18:26:45 +0200 Subject: [PATCH] [Maintenance] Replaced Gedmo extension with Doctrine's built-in lifecycle callbacks for `createdAt` and `updatedAt` fields --- config/doctrine/AdyenPaymentDetail.orm.xml | 14 +++++++------- config/doctrine/AdyenReference.orm.xml | 14 +++++++------- src/Entity/AdyenPaymentDetail.php | 10 ++++++++++ src/Entity/AdyenReference.php | 10 ++++++++++ 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/config/doctrine/AdyenPaymentDetail.orm.xml b/config/doctrine/AdyenPaymentDetail.orm.xml index 044394b8..f264991c 100644 --- a/config/doctrine/AdyenPaymentDetail.orm.xml +++ b/config/doctrine/AdyenPaymentDetail.orm.xml @@ -3,10 +3,14 @@ + + + + + @@ -19,12 +23,8 @@ - - - - - - + + diff --git a/config/doctrine/AdyenReference.orm.xml b/config/doctrine/AdyenReference.orm.xml index 2584dd8d..9422a963 100644 --- a/config/doctrine/AdyenReference.orm.xml +++ b/config/doctrine/AdyenReference.orm.xml @@ -3,22 +3,22 @@ + + + + + - - - - - - + + diff --git a/src/Entity/AdyenPaymentDetail.php b/src/Entity/AdyenPaymentDetail.php index 0dc089dc..5e7c248f 100644 --- a/src/Entity/AdyenPaymentDetail.php +++ b/src/Entity/AdyenPaymentDetail.php @@ -31,6 +31,16 @@ class AdyenPaymentDetail implements ResourceInterface, TimestampableInterface, A protected PaymentInterface $payment; + public function setCreatedAtValue(): void + { + $this->setCreatedAt(new \DateTime()); + } + + public function setUpdatedAtValue(): void + { + $this->setUpdatedAt(new \DateTime()); + } + public function getId(): ?int { return $this->id; diff --git a/src/Entity/AdyenReference.php b/src/Entity/AdyenReference.php index b9ceff8e..e393999d 100644 --- a/src/Entity/AdyenReference.php +++ b/src/Entity/AdyenReference.php @@ -31,6 +31,16 @@ class AdyenReference implements ResourceInterface, AdyenReferenceInterface, Time protected ?RefundPaymentInterface $refundPayment; + public function setCreatedAtValue(): void + { + $this->setCreatedAt(new \DateTime()); + } + + public function setUpdatedAtValue(): void + { + $this->setUpdatedAt(new \DateTime()); + } + public function getId(): ?int { return $this->id;