survos / storage-bundle
Symfony bundle for interacting with storage (via Flysystem)
Package info
github.com/survos/storage-bundle
Type:symfony-bundle
pkg:composer/survos/storage-bundle
Fund package maintenance!
Requires
- php: ^8.5
- ext-zip: *
- doctrine/doctrine-bundle: ^3.2
- doctrine/orm: ^3.6
- league/flysystem-bundle: ^3.5
- survos/jsonl-bundle: ^2.5
- survos/kit-bundle: ^2.5
- symfony/config: ^8.1
- symfony/dependency-injection: ^8.1
- symfony/http-kernel: ^8.1
- symfony/string: ^8.1
- twig/twig: ^3.4
- zenstruck/bytes: ^1.0
Requires (Dev)
- league/flysystem-aws-s3-v3: ^3.29
- phpstan/phpstan: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^13.0
- survos/simple-datatables-bundle: ^2.5
- symfony/browser-kit: ^8.1
- symfony/console: ^8.1
- symfony/framework-bundle: ^8.1
- symfony/http-client: ^8.1
- symfony/messenger: ^8.1
- symfony/phpunit-bridge: ^8.1
- symfony/stopwatch: ^8.1
- symfony/twig-bundle: ^8.1
- symfony/var-dumper: ^8.1
- symfony/yaml: ^8.1
Suggests
- survos/imgproxy-bundle: optional thumbnail and preview rendering for image objects
- survos/simple-datatables-bundle: searchable/sortable tables when browsing
This package is auto-updated.
Last update: 2026-06-20 20:31:36 UTC
README
A Symfony bundle to interact with storage (via Flysystem). It exposes commands, controllers and twig utilities. All of the underlying storage happens through Flysystem.
Quickstart
symfony new storage-demo --webapp && cd storage-demo composer require survos/storage-bundle
Optional thumbnail support:
composer require survos/imgproxy-bundle
Without imgproxy, the bundle still works normally and falls back to direct object links instead of generated image thumbnails/previews.
Configure Flysystem, including the relevant env vars if using something besides local
# config/packages/flysystem.yaml # Read the documentation at https://github.com/thephpleague/flysystem-bundle/blob/master/docs/1-getting-started.md flysystem: storages: default.storage: adapter: 'aws' # visibility: public # Make the uploaded file publicly accessible in S3 options: client: 'Aws\S3\S3Client' # The service ID of the Aws\S3\S3Client instance bucket: '%env(AWS_S3_BUCKET_NAME)%' streamReads: true prefix: '%env(S3_STORAGE_PREFIX)%' when@dev: flysystem: storages: default.storage: adapter: 'local' options: directory: '%kernel.project_dir%/public/storage'
symfony new storage-demo --webapp && cd storage-demo composer require survos/storage-bundle bin/console storage:config bin/console storage:list
You can browse interactively with the basic admin controller.
composer require survos/simple-datatables-bundle symfony server:start -d symfony open:local --path=/storage/zones
Storage zones (and their credentials) are configured in flysystem.yaml as shown above —
local during dev, S3/Bunny/etc. in production via env vars.
To see what got wired at runtime, run the read-only diagnostic:
bin/console storage:config
It dumps the resolved zones and their adapters (class, root/bucket), which is handy for confirming env vars resolved correctly. It makes no changes and needs no credentials.
Legacy note: earlier versions shipped a Bunny-specific
storage:config <api-key>that fetched per-zone keys from the Bunny dashboard. The bundle is now backend-agnostic (Flysystem), so that key-fetcher is gone;storage:configis purely diagnostic.
Your application now has a bare-bones controller located at /admin/storage, you may want to secure this route in security.yaml, or configure it in config/routes/survos_storage.yaml.
You also have access to a command line interface.
bin/console storage:list
+------------- museado/ -----+--------+ | ObjectName | Path | Length | +----------------+-----------+--------+ | photos finales | /museado/ | 0 | +----------------+-----------+--------+