webalternatif/flysystem-dsn-bundle
A Symfony bundle that configures Flysystem filesystems from DSN strings, letting you define local, S3, or other adapters with a single URL-style value instead of repetitive service configuration.
Package: webalternatif/flysystem-dsn-bundle v0.9.0 (released 2026-10-04)
What it is: A Symfony bundle that configures League/Flysystem storage adapters from DSN strings (e.g. s3://key:secret@bucket?region=eu-west-1) rather than from hand-written adapter option arrays. The value proposition is configuration ergonomics: one URI replaces a per-adapter config block plus a factory.
Architecture fit — moderate, with a caveat. The underlying library (Flysystem) is already a first-class dependency of Laravel: Illuminate\Filesystem\FilesystemAdapter wraps League\Flysystem\Filesystem, and Storage::build() already accepts a runtime array of driver config. What this package adds is parsing and adapter selection, which is real but thin. The delivery mechanism — a Symfony bundle with a DI extension, config tree, and compiler passes — is not reusable in Laravel. We would consume the DSN-parsing idea, not the package as shipped, unless the vendor exposes a framework-agnostic parser as a standalone artifact.
Integration feasibility — feasible via re-implementation, not installation. Two viable paths:
| Path | Effort | Fit |
|---|---|---|
| Install bundle as-is | n/a | Reject — Symfony kernel/bundle registration, incompatible with Laravel's service container lifecycle |
Vendor the DSN parser (if published standalone or via a small copy) and wrap in a FilesystemManager extension |
1–2 dev-days | Good |
Write our own ~150-line DsnDiskFactory calling Storage::build() |
1–2 dev-days | Good, no third-party coupling |
Technical risk — elevated, driven by version and vendor signals rather than by code quality (which we have not inspected):
0.9.x, semver permits breaking changes in minor releases. Any integration must pin an exact version and treat upgrades as reviews, not bumps. v0.9.0 is presumably the last stop before 1.0 — expect churn..env, in php artisan config:cache output, in exception traces, and in dump()-style debugging. URL-encoded credentials (@, /, ? in a password) are a classic source of silent, hard-to-diagnose auth failures.webalternatif is a low-visibility publisher. Bus factor, security disclosure process, and long-term maintenance are unknown. A filesystem abstraction is infrastructure — it does not fail loudly when abandoned.Key questions for the maintainer / spike:
debug: output?Stack fit. Poor as a package install, good as a pattern. Laravel's config/filesystems.php returns disks keyed by name; every call site uses Storage::disk('name'). That indirection is the seam we exploit: DSN-driven configuration becomes a disk-definition generator, and no application code changes. The bundle's Symfony integration surface (extension class, config tree, compiler pass) is discarded entirely.
Migration path.
DsnDiskFactory::make(string $dsn): array returning a Laravel driver-config array. Prove it round-trips against our existing s3 and local disk definitions.reports_archive_v2) alongside existing ones. Migrate consumers disk-by-disk, not in a flag-day.Compatibility. If the DSN parser is not extractable, do not fork the bundle. Write the factory in-house — it is small, testable, and removes the vendor from our dependency graph entirely, which is the correct risk posture for a pre-1.0 infrastructure package from a low-visibility publisher. Reserve vendor adoption for a post-1.0 release with a standalone parser and a credible support commitment.
Sequencing constraints. Secrets work precedes any DSN adoption: rotating to a secrets manager and confirming that DSN strings never enter config:cache artifacts is a prerequisite, not a follow-on. Local development must be handled explicitly — a local:// DSN scheme is convenient for onboarding but must not become the only way to configure a dev disk.
Maintenance. Minimal under the in-house-factory path: ~150 lines plus tests, owned by us, exercised on every deploy. Under the vendor path: an exact-pinned dependency needing manual review at every release, with the 0.9→1.0 transition almost certainly breaking. Across a multi-service estate, the in-house factory is duplicated per service (small) or extracted to an internal package (small, one-time).
Support. No commercial support or SLA is evident. Internal ownership is required either way — Flysystem adapter behaviour in production is our incident, not the vendor's. Document the DSN scheme grammar we support in the platform runbook; undocumented DSN syntax is the most likely source of "works on my machine" tickets.
Scaling. Configuration scaling is fine — DSNs are per-disk, not per-request. The operational scaling concern is adapter-level: connection pool exhaustion, request timeouts, and retry behaviour are properties of the underlying Flysystem adapter and are not governed by the DSN layer. If DSNs make it cheap to add ten new remote disks, we will add ten new remote disks, each with its own failure surface. Gate new-disk requests through platform review.
Failure modes to instrument:
Storage::disk() call fails a single request. Laravel's lazy disk resolution is safer — verify the factory does not parse eagerly at config-load time.@ or # in a secret silently misparses into the wrong host or truncates the password. Validate DSN structure and fail with an explicit message naming the offending component, never the value.config:cache artifact retains them.Ramp-up. Low for the DSN concept — an engineer familiar with Storage::build() is productive in half a day. Higher for the vendor package, which requires Symfony DI literacy to debug and offers no transferable knowledge. Budget one platform-engineer week end-to-end for the in-house path including parity tests, secrets work, and runbook documentation; roughly double if the stakeholder decision is to adopt the bundle and the Symfony integration must be bridged.
Recommendation: Adopt the pattern, not the package. Re-run this assessment if v1.0.0 ships a framework-agnostic parser with a documented support policy and a clean changelog — and, critically, if the v0.9.0 CHANGELOG diff, which this assessment could not read, shows a stable configuration grammar.
How can I help you explore Laravel packages today?