Remove usage of deprecated MessageHandlerInterface

This commit is contained in:
Grzegorz Sadowski 2024-09-25 07:44:46 +02:00
parent 64d6b9d526
commit 94930b8d20
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
9 changed files with 15 additions and 15 deletions

View file

@ -19,7 +19,6 @@ use Sylius\Component\Core\Model\OrderItemInterface;
use Sylius\Component\Order\Modifier\OrderModifierInterface;
use Sylius\Component\Order\Repository\OrderItemRepositoryInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Webmozart\Assert\Assert;
#[AsMessageHandler]

View file

@ -25,10 +25,11 @@ use Sylius\Component\Core\Repository\PaymentRepositoryInterface;
use Sylius\Component\Payment\Factory\PaymentRequestFactoryInterface;
use Sylius\Component\Payment\Model\PaymentRequestInterface;
use Sylius\Component\Payment\Repository\PaymentRequestRepositoryInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
/** @experimental */
final class AddPaymentRequestHandler implements MessageHandlerInterface
#[AsMessageHandler]
final class AddPaymentRequestHandler
{
/**

View file

@ -17,10 +17,11 @@ use Sylius\Bundle\ApiBundle\Command\Payment\UpdatePaymentRequest;
use Sylius\Component\Payment\Exception\PaymentRequestNotFoundException;
use Sylius\Component\Payment\Model\PaymentRequestInterface;
use Sylius\Component\Payment\Repository\PaymentRequestRepositoryInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
/** @experimental */
final class UpdatePaymentRequestHandler implements MessageHandlerInterface
#[AsMessageHandler]
final class UpdatePaymentRequestHandler
{
/**
* @param PaymentRequestRepositoryInterface<PaymentRequestInterface> $paymentRequestRepository

View file

@ -15,7 +15,6 @@ namespace Sylius\Bundle\ApiBundle\Application\CommandHandler;
use Sylius\Bundle\ApiBundle\Application\Command\FooCommand;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
#[AsMessageHandler]
final class FooHandler

View file

@ -20,7 +20,6 @@ use Sylius\Component\User\Repository\UserRepositoryInterface;
use Sylius\Component\User\Security\Generator\GeneratorInterface;
use Symfony\Component\Clock\ClockInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Messenger\Stamp\DispatchAfterCurrentBusStamp;

View file

@ -18,7 +18,6 @@ use Sylius\Bundle\CoreBundle\Mailer\ResetPasswordEmailManagerInterface;
use Sylius\Component\Core\Model\AdminUserInterface;
use Sylius\Component\User\Repository\UserRepositoryInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Webmozart\Assert\Assert;
#[AsMessageHandler]

View file

@ -14,13 +14,13 @@ declare(strict_types=1);
namespace Sylius\Bundle\CoreBundle\PaymentRequest\CommandHandler\Offline;
use Sylius\Bundle\CoreBundle\PaymentRequest\Command\Offline\CapturePaymentRequest;
use Sylius\Bundle\CoreBundle\PaymentRequest\Processor\Offline\CaptureProcessorInterface;
use Sylius\Bundle\CoreBundle\PaymentRequest\Provider\PaymentRequestProviderInterface;
use Sylius\Component\Payment\Model\PaymentRequestInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
/** @experimental */
final class CapturePaymentRequestHandler implements MessageHandlerInterface
#[AsMessageHandler]
final class CapturePaymentRequestHandler
{
public function __construct(
private readonly PaymentRequestProviderInterface $paymentRequestProvider,

View file

@ -20,9 +20,10 @@ use Sylius\Bundle\CoreBundle\PaymentRequest\Provider\PaymentRequestProviderInter
use Sylius\Bundle\PayumBundle\Factory\GetStatusFactoryInterface;
use Sylius\Bundle\PayumBundle\Model\GatewayConfigInterface;
use Sylius\Component\Core\Model\PaymentMethodInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
final class ModelPaymentRequestHandler implements MessageHandlerInterface
#[AsMessageHandler]
final class ModelPaymentRequestHandler
{
public function __construct(
private PaymentRequestProviderInterface $paymentRequestProvider,

View file

@ -21,9 +21,10 @@ use Sylius\Bundle\CoreBundle\PaymentRequest\Processor\Payum\RequestProcessorInte
use Sylius\Bundle\CoreBundle\PaymentRequest\Provider\PaymentRequestProviderInterface;
use Sylius\Bundle\PayumBundle\Factory\TokenAggregateRequestFactoryInterface;
use Sylius\Component\Payment\Exception\NonExistingPayumTokenException;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
final class TokenPaymentRequestHandler implements MessageHandlerInterface
#[AsMessageHandler]
final class TokenPaymentRequestHandler
{
public function __construct(
private PaymentRequestProviderInterface $paymentRequestProvider,