From bc85f276a6ee928650c51d9dbd0ad27570355b3d Mon Sep 17 00:00:00 2001 From: Supun Wimalasena Date: Fri, 13 Feb 2026 12:49:33 +0100 Subject: [PATCH] subscription ID --- bundle/src/Api/ApiExceptionListener.php | 2 ++ src/Billing/License/Resolved/ResolvedLicenseSubscription.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bundle/src/Api/ApiExceptionListener.php b/bundle/src/Api/ApiExceptionListener.php index 5eb9e00..d3c017f 100644 --- a/bundle/src/Api/ApiExceptionListener.php +++ b/bundle/src/Api/ApiExceptionListener.php @@ -102,6 +102,8 @@ public function __invoke(ExceptionEvent $event): void private function hideEnum(string $message): string { + // TODO: new versions of Symfony does not include the enum name in the error + // This value should be of type App\Enum\SubscriberStatus // This value should be of type subscribed|unsubscribed|pending. $message = preg_replace_callback( diff --git a/src/Billing/License/Resolved/ResolvedLicenseSubscription.php b/src/Billing/License/Resolved/ResolvedLicenseSubscription.php index ce640d3..a496cae 100644 --- a/src/Billing/License/Resolved/ResolvedLicenseSubscription.php +++ b/src/Billing/License/Resolved/ResolvedLicenseSubscription.php @@ -6,6 +6,7 @@ class ResolvedLicenseSubscription implements \JsonSerializable { public function __construct( + public int $id, public string $status, public float $monthlyPrice, public bool $isAnnual, @@ -19,6 +20,7 @@ public function __construct( public function jsonSerialize(): mixed { return [ + 'id' => $this->id, 'status' => $this->status, 'monthly_price' => $this->monthlyPrice, 'is_annual' => $this->isAnnual,