Skip to content

Commit

Permalink
Merge pull request #34 from thephpleague/fix-autowiring-lazy
Browse files Browse the repository at this point in the history
Fix autowiring of lazy storages
  • Loading branch information
tgalopin authored Dec 21, 2019
2 parents f1bf394 + 13c5dee commit a5185e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DependencyInjection/FlysystemExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ private function createStoragesDefinitions(array $config, ContainerBuilder $cont
if ('lazy' === $storageConfig['adapter']) {
$container->setDefinition($storageName, $this->createLazyStorageDefinition($storageName, $storageConfig['options']));

// Register named autowiring alias
$container->registerAliasForArgument($storageName, FilesystemInterface::class, $storageName)->setPublic(false);

continue;
}

Expand Down

0 comments on commit a5185e5

Please sign in to comment.