short-edition/knp-gaufrette-bundle
Symfony bundle integrating Gaufrette, the PHP filesystem abstraction library. Configure local and remote filesystem adapters as services, inject them into your app, and use Gaufrette's stream wrapper for uniform file access across storage backends.
Frame the decision correctly first: this is not a Laravel package. The brief classifies it as "Laravel/PHP," but it is a Symfony bundle — it depends on the Symfony kernel, bundle registration, and the DI container, and ships no service provider or facade. If the roadmap is Laravel, the decision this package actually supports is a negative one: do not adopt; use Laravel's native Storage (Flysystem) instead. On a Symfony roadmap, the decisions below apply.
Filesystem interface with swappable adapters. Choosing the abstraction converts a storage migration from a rewrite into a configuration change — attractive when a cloud or region move is anywhere on the 12–18 month horizon.knplabs/KnpGaufretteBundle. The decision is therefore not "adopt this library" but "do we standardize on Gaufrette at all — and if so, track upstream, pin a fork, or vendor it?" That is a governance decision, not a feature decision.Consider it only when all of the following hold:
Look elsewhere when:
Storage/Flysystem. A Symfony bundle cannot be composer require'd into Laravel and made to work without bespoke glue you would own.league/flysystem-bundle has stronger momentum, broader adapters, and better support signal. Gaufrette is defensible mainly for legacy compatibility.For executives — one paragraph: We can treat file storage as a pluggable capability instead of a per-provider integration project: build upload, media, and document features once and point them at local disk, S3, Azure, or GCS by configuration. If we go this route on Symfony, a future cloud or region migration becomes a config change rather than a rewrite, and we retire a recurring category of production-only file defects. The important caveat is scope: this artifact is Symfony-only. If the roadmap includes Laravel, it does not apply there and the equivalent is Flysystem — we should not let a package-name search blur the two ecosystems.
For engineering — the summary:
A thin Symfony DI wrapper over Gaufrette's adapter/stream-wrapper model: named filesystems injected via config, adapters for local, SFTP, S3, Azure, GCS, DBAL, GridFS, in-memory, and ZIP, plus gaufrette:// stream wrapper registration. Value is standardized access and swappable backends; cost is an extra layer plus a real dependency-ownership conversation.
Risks to state openly:
knplabs/KnpGaufretteBundle upstream, a fork carrying a local patch, or a vendored snapshot — and record it in the ADR. A low-traffic fork is a weak link in dependency review; pin to a commit SHA, not a tag.The ask:
Approve a timeboxed spike — one engineer, one to two weeks — to (a) confirm framework target first (if Laravel, pivot immediately to Flysystem and stop), (b) diff the fork against upstream and confirm PHP/Symfony compatibility, (c) prototype a named-filesystem map with local in dev and S3 in staging, and (d) produce a one-page comparison against league/flysystem-bundle. Deliver a recommendation: adopt, adopt-with-fork-ownership, or standardize on Flysystem. Default recommendation: Flysystem for greenfield Symfony and for anything Laravel; stay-and-track-upstream only for an existing Symfony codebase already committed to Gaufrette.
How can I help you explore Laravel packages today?