From 4665c6a9de76fafc58bee83e47523727937575dc Mon Sep 17 00:00:00 2001 From: merovingian Date: Fri, 12 Jun 2026 13:24:50 +0300 Subject: [PATCH] HQD-142: Add deprecated() marker and isDeprecated() to PriceTypeDefinition --- src/product/price/PriceTypeDefinition.php | 9 +++++++++ src/product/price/PriceTypeDefinitionInterface.php | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/product/price/PriceTypeDefinition.php b/src/product/price/PriceTypeDefinition.php index d490859a..e517ccde 100644 --- a/src/product/price/PriceTypeDefinition.php +++ b/src/product/price/PriceTypeDefinition.php @@ -48,6 +48,8 @@ class PriceTypeDefinition implements PriceTypeDefinitionInterface */ private RepresentationCollection $representationCollection; + private bool $deprecated = false; + private ?AggregateInterface $aggregate = null; private readonly PriceTypeBehaviorRegistry $behaviorRegistry; @@ -242,6 +244,13 @@ public function deprecated(): static { $this->ensureNotLocked(); + $this->deprecated = true; + return $this; } + + public function isDeprecated(): bool + { + return $this->deprecated; + } } diff --git a/src/product/price/PriceTypeDefinitionInterface.php b/src/product/price/PriceTypeDefinitionInterface.php index c46bd61d..9f06d552 100644 --- a/src/product/price/PriceTypeDefinitionInterface.php +++ b/src/product/price/PriceTypeDefinitionInterface.php @@ -76,4 +76,6 @@ public function getQuantityFormatterDefinition(): ?QuantityFormatterDefinition; * and must not appear in new tariff configurations. */ public function deprecated(): static; + + public function isDeprecated(): bool; }