From 814841e3f47418db3965e0fc1357c6e97792a9e8 Mon Sep 17 00:00:00 2001 From: janpalen Date: Mon, 7 Oct 2024 14:18:55 +0200 Subject: [PATCH] OP-550 - Remove deprecated implementations --- .../AddProductBundleToCartDtoDataTransformer.php | 3 +-- src/Handler/AddProductBundleToCartHandler.php | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DataTransformer/AddProductBundleToCartDtoDataTransformer.php b/src/DataTransformer/AddProductBundleToCartDtoDataTransformer.php index 323a6b30..adb24e11 100644 --- a/src/DataTransformer/AddProductBundleToCartDtoDataTransformer.php +++ b/src/DataTransformer/AddProductBundleToCartDtoDataTransformer.php @@ -11,13 +11,12 @@ namespace BitBag\SyliusProductBundlePlugin\DataTransformer; -use ApiPlatform\Core\DataTransformer\DataTransformerInterface; use BitBag\SyliusProductBundlePlugin\Command\AddProductBundleToCartCommand; use BitBag\SyliusProductBundlePlugin\Dto\Api\AddProductBundleToCartDto; use Sylius\Component\Order\Model\OrderInterface; use Webmozart\Assert\Assert; -final class AddProductBundleToCartDtoDataTransformer implements DataTransformerInterface +final class AddProductBundleToCartDtoDataTransformer { public const OBJECT_TO_POPULATE = 'object_to_populate'; diff --git a/src/Handler/AddProductBundleToCartHandler.php b/src/Handler/AddProductBundleToCartHandler.php index 4c4b9832..3b5d21a2 100644 --- a/src/Handler/AddProductBundleToCartHandler.php +++ b/src/Handler/AddProductBundleToCartHandler.php @@ -17,10 +17,11 @@ use BitBag\SyliusProductBundlePlugin\Handler\AddProductBundleToCartHandler\CartProcessorInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; -use Symfony\Component\Messenger\Handler\MessageHandlerInterface; +use Symfony\Component\Messenger\Attribute\AsMessageHandler; use Webmozart\Assert\Assert; -final class AddProductBundleToCartHandler implements MessageHandlerInterface +#[AsMessageHandler] +final class AddProductBundleToCartHandler { public function __construct( private OrderRepositoryInterface $orderRepository,