Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions docs/1-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- [Installation](#installation)
- [Basic usage](#basic-usage)
- [Discovering the available configuration options](#discovering-the-available-configuration-options)
- [Transferring files with console commands](#transferring-files-with-console-commands)
- [Using multiple storages to improve readability](#using-multiple-storages-to-improve-readability)
- [Using memory storage in tests](#using-memory-storage-in-tests)
Expand Down Expand Up @@ -77,6 +78,15 @@ Once you have a FilesystemOperator, you can call methods from the
[Filesystem API](https://flysystem.thephpleague.com/docs/usage/filesystem-api/)
to interact with your storage.

## Discovering the available configuration options

Every option, including adapter-specific ones, is declared with a description, a default value
and whether it's required. Dump the full reference tree instead of reading the source code:

```bash
bin/console config:dump-reference flysystem
```

## Transferring files with console commands

If you need to transfer files between the local filesystem and one of your configured
Expand Down Expand Up @@ -196,8 +206,9 @@ With this configuration, any write operation will throw a suitable exception.

## Storage options

Beyond the adapter-specific options, every storage accepts a set of general options that
are passed to the underlying Flysystem `Filesystem` instance, regardless of the adapter used:
Beyond the adapter-specific options, every storage accepts a set of general options,
regardless of the adapter used. Most of them are passed to the underlying Flysystem
`Filesystem` instance:

```yaml
# config/packages/flysystem.yaml
Expand Down Expand Up @@ -235,6 +246,10 @@ flysystem:
# don't support it natively (AWS S3, AsyncAws S3, Azure and Google Cloud
# Storage do support it out of the box)
temporary_url_generator: 'App\Flysystem\MyTemporaryUrlGenerator'

# Converts the storage to read-only, see "Using read only to disallow any
# write operations" above (requires league/flysystem-read-only)
read_only: false
```

All of these options are optional: adapters that natively support public/temporary URLs
Expand Down
4 changes: 2 additions & 2 deletions docs/5-creating-a-custom-adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ class Kernel extends BaseKernel
}
```

Once registered, you can use the `debug:config flysystem` command to see your custom adapter
and all its available options in the configuration tree.
Once registered, you can use the `config:dump-reference flysystem` command to see your custom
adapter and all its available options in the configuration tree.

### Testing your custom builder

Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->defaultNull()
->info('Default visibility for directories')
->end()
->scalarNode('retain_visibility')
->booleanNode('retain_visibility')
->defaultNull()
->info('Keeps the original file visibility (public/private) when copying or moving.')
->end()
Expand Down
Loading