Skip to content

Commit

Permalink
Remove usage of deprecated ContainerAware
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmy committed Dec 21, 2023
1 parent 48d4fea commit b5ef96e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/async-event-dispatcher/ContainerAwareRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

namespace Enqueue\AsyncEventDispatcher;

use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;

class ContainerAwareRegistry implements Registry, ContainerAwareInterface
class ContainerAwareRegistry implements Registry
{
use ContainerAwareTrait;

/**
* @var string[]
*/
Expand All @@ -19,6 +16,8 @@ class ContainerAwareRegistry implements Registry, ContainerAwareInterface
*/
private $transformersMap;

private ContainerInterface $container;

/**
* @param string[] $eventsMap [eventName => transformerName]
* @param string[] $transformersMap [transformerName => transformerServiceId]
Expand All @@ -29,6 +28,11 @@ public function __construct(array $eventsMap, array $transformersMap)
$this->transformersMap = $transformersMap;
}

public function setContainer(ContainerInterface $container = null)
{
$this->container = $container;
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit b5ef96e

Please sign in to comment.