diff --git a/src/AwsBundle/Client/AwsSdks.php b/src/AwsBundle/Client/AwsSdks.php index d026f1f..80665a9 100644 --- a/src/AwsBundle/Client/AwsSdks.php +++ b/src/AwsBundle/Client/AwsSdks.php @@ -5,26 +5,26 @@ namespace Ruwork\AwsBundle\Client; use Aws\Sdk; -use Symfony\Component\DependencyInjection\ServiceLocator; +use Psr\Container\ContainerInterface; final class AwsSdks { - private $locator; + private $container; private $defaultName; - public function __construct(ServiceLocator $locator, string $defaultName) + public function __construct(ContainerInterface $container, string $defaultName) { - $this->locator = $locator; + $this->container = $container; $this->defaultName = $defaultName; } public function has(string $name): bool { - return $this->locator->has($name); + return $this->container->has($name); } public function get(?string $name = null): Sdk { - return $this->locator->get($name ?? $this->defaultName); + return $this->container->get($name ?? $this->defaultName); } } diff --git a/src/AwsBundle/DependencyInjection/RuworkAwsExtension.php b/src/AwsBundle/DependencyInjection/RuworkAwsExtension.php index d480de9..5254cb2 100644 --- a/src/AwsBundle/DependencyInjection/RuworkAwsExtension.php +++ b/src/AwsBundle/DependencyInjection/RuworkAwsExtension.php @@ -44,7 +44,7 @@ public function loadInternal(array $config, ContainerBuilder $container): void $container ->findDefinition(AwsSdks::class) ->setArguments([ - '$locator' => ServiceLocatorTagPass::register($container, $references), + '$container' => ServiceLocatorTagPass::register($container, $references), '$defaultName' => $config['default_sdk'], ]); }