Skip to content

Commit

Permalink
Use service injection in AsyncAwsS3Factory
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrantosik authored Oct 14, 2024
1 parent c1c3172 commit 78194dd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ public function getKey(): string

public function create(ContainerBuilder $container, string $id, array $config): void
{
$visibilityConverter = $config['visibilityConverter'] ? new Reference($config['visibilityConverter']) : null;

$container
->setDefinition($id, new ChildDefinition('oneup_flysystem.adapter.async_aws_s3'))
->replaceArgument(0, new Reference($config['client']))
->replaceArgument(1, $config['bucket'])
->replaceArgument(2, $config['prefix'])
->replaceArgument(3, $config['visibilityConverter'])
->replaceArgument(3, $visibilityConverter)
;
}

Expand Down

0 comments on commit 78194dd

Please sign in to comment.