Skip to content

Commit

Permalink
Merge pull request #3 from aligent/hotfix/replace-outdated-symfony-Re…
Browse files Browse the repository at this point in the history
…gistryInterface-with-ManagerRegistry

Deprecated Symfony RegistryInterface service replaced with ManagerRegistry
  • Loading branch information
Zigr1 authored Feb 1, 2022
2 parents 268bb06 + 176d16d commit d096c18
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Async/AbstractRetryableProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Oro\Component\MessageQueue\Util\JSON;
use Psr\Log\LoggerInterface;
use Oro\Component\MessageQueue\Client\Config;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Symfony\Bridge\Doctrine\ManagerRegistry;

abstract class AbstractRetryableProcessor implements MessageProcessorInterface, RetryableProcessorInterface
{
Expand All @@ -34,16 +34,16 @@ abstract class AbstractRetryableProcessor implements MessageProcessorInterface,
protected $logger;

/**
* @var RegistryInterface
* @var ManagerRegistry
*/
protected $registry;

/**
* AbstractRetryableProcessor constructor.
* @param LoggerInterface $logger
* @param RegistryInterface $registry
* @param ManagerRegistry $registry
*/
public function __construct(LoggerInterface $logger, RegistryInterface $registry)
public function __construct(LoggerInterface $logger, ManagerRegistry $registry)
{
$this->logger = $logger;
$this->registry = $registry;
Expand Down Expand Up @@ -93,7 +93,7 @@ protected function handleFailure(MessageInterface $message, RetryableException $
$exception = $exception->getPrevious();
}

$em = $this->registry->getEntityManager();
$em = $this->registry->getManager();
$failedJob = new FailedJob(
$message->getProperty(Config::PARAMETER_TOPIC_NAME),
JSON::decode($message->getBody()),
Expand Down

0 comments on commit d096c18

Please sign in to comment.