Skip to content

Commit

Permalink
Be able to configure $lazyRootCreation of LocalFilesystemAdapter (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoussard authored Aug 8, 2023
1 parent f69f917 commit a8d9b5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/adapter_local.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ oneup_flysystem:
dir:
public: 0o755
private: 0o700
lazyRootCreation: ~ # boolean (default "false")
```
For more details on the `lazy` parameter, take a look at the [Symfony documentation](http://symfony.com/doc/current/components/dependency_injection/lazy_services.html).
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyInjection/Factory/Adapter/LocalFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function create(ContainerBuilder $container, string $id, array $config):
->replaceArgument(2, $config['writeFlags'])
->replaceArgument(3, $config['linkHandling'])
->replaceArgument(4, $config['mimeTypeDetector'])
->replaceArgument(5, $config['lazyRootCreation'])
;
}

Expand Down Expand Up @@ -91,6 +92,7 @@ public function addConfiguration(NodeDefinition $node): void
->scalarNode('writeFlags')->defaultValue(\LOCK_EX)->end()
->scalarNode('linkHandling')->defaultValue(LocalFilesystemAdapter::DISALLOW_LINKS)->end()
->scalarNode('mimeTypeDetector')->defaultNull()->end()
->scalarNode('lazyRootCreation')->defaultValue(false)->end()
->end()
;
}
Expand Down
1 change: 1 addition & 0 deletions src/Resources/config/adapters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<argument/><!-- writeFlags -->
<argument/><!-- linkHandling -->
<argument/><!-- MimeTypeDetector -->
<argument/><!-- lazyRootCreation -->
</service>
<service id="oneup_flysystem.adapter.awss3v3" class="League\Flysystem\AwsS3V3\AwsS3V3Adapter" abstract="true" public="false">
<argument/><!-- S3ClientInterface -->
Expand Down

0 comments on commit a8d9b5b

Please sign in to comment.