Skip to content

Commit

Permalink
add comment about DI fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
adam187 committed Jun 3, 2015
1 parent 2c2e235 commit 658148d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Expand Up @@ -20,6 +20,7 @@ public function create(ContainerBuilder $container, $resolverName, array $config
if (method_exists($awsS3ClientDefinition, 'setFactory')) {
$awsS3ClientDefinition->setFactory(array('Aws\S3\S3Client', 'factory'));
} else {
// to be removed when dependency on Symfony DependencyInjection is bumped to 2.6
$awsS3ClientDefinition->setFactoryClass('Aws\S3\S3Client');
$awsS3ClientDefinition->setFactoryMethod('factory');
}
Expand Down
2 changes: 2 additions & 0 deletions DependencyInjection/LiipImagineExtension.php
Expand Up @@ -129,8 +129,10 @@ private function setFactories($container)
foreach ($factories as $service => $factory) {
$definition = $container->getDefinition($service);
if (method_exists($definition, 'setFactory')) {
// to be inlined in imagine.xml when dependency on Symfony DependencyInjection is bumped to 2.6
$definition->setFactory($factory);
} else {
// to be removed when dependency on Symfony DependencyInjection is bumped to 2.6
$definition->setFactoryClass($factory[0]);
$definition->setFactoryMethod($factory[1]);
}
Expand Down

0 comments on commit 658148d

Please sign in to comment.