From 9b0c5cf49bd45adce337fefdc8bc4ce5e295e4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20T=C3=BDc?= Date: Tue, 1 Oct 2024 11:37:56 +0200 Subject: [PATCH] Fix comparison of order items Fix comparison of order items when one of them is Doctrine proxy object --- src/Sylius/Component/Core/Model/OrderItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sylius/Component/Core/Model/OrderItem.php b/src/Sylius/Component/Core/Model/OrderItem.php index e67cc62b759..37d86ff45f6 100644 --- a/src/Sylius/Component/Core/Model/OrderItem.php +++ b/src/Sylius/Component/Core/Model/OrderItem.php @@ -82,7 +82,7 @@ public function setVariantName(?string $variantName): void public function equals(BaseOrderItemInterface $orderItem): bool { - return parent::equals($orderItem) || ($orderItem instanceof static && $orderItem->getVariant() === $this->variant); + return parent::equals($orderItem) || ($orderItem instanceof self && $orderItem->getVariant() === $this->variant); } /**