carloschininin/attach-file-bundle
Attach File Bundle adds reusable file-attachment support to Symfony/PHP apps, letting you associate uploaded files with Doctrine entities and manage storage through simple, configurable bundle services. It streamlines uploads, entity relationships, and file handling so you can add attachments withou...
Feature scoping: "attach a file" is never one ticket. File attachment touches storage backends, MIME/size validation, polymorphic entity relationships, image derivatives, retention/deletion policy, malware scanning, and access control. This bundle is a candidate only for the plumbing layer — the entity-to-file association and persistence — and should be evaluated against that narrow scope, not against a full media-management product.
Build vs. buy triage for a Symfony service. If your stack is genuinely Symfony, this is a low-cost spike candidate: pull it into a sandbox branch, wire one entity, and time-box an evaluation (1–2 days). The decision it informs is "do we adopt, fork, or write ~200 lines of Doctrine entity + filesystem service ourselves?" For a domain this small, the honest default is often build in-house, and this package is the benchmark you compare that against.
Framework-strategy decision, not just a library decision. Despite being filed under Laravel/PHP, this is a Symfony bundle — it will not drop into Laravel's service container, Eloquent models, or filesystem abstraction without an adapter layer. If your product is Laravel-first, the correct output of this evaluation is a rejection on architecture mismatch, not on quality. If your estate is mixed PHP/Symfony, it becomes a legitimate reuse candidate.
Roadmap input on vendor concentration. Stars (1), dependents (0), and a single maintainer put this firmly in "unproven" territory. The PM decision this supports is whether attachment handling is a core differentiator (then own it — in-house or a well-funded vendor) or undifferentiated plumbing (then tolerate a small package, but pin the version and wrap it behind your own interface so you can swap it).
Use cases it plausibly serves: internal admin tools, back-office document uploads, prototype/MVP attachment features where time-to-demo matters and failure is recoverable, and Symfony projects that want a minimal bundle rather than a heavyweight DAM.
What it should not gate: anything customer-facing with SLAs, regulated data, or public file serving. Those need scanning, signed URLs, and retention guarantees this package almost certainly doesn't provide.
Consider it when:
AttachmentService interface.Look elsewhere when:
spatie/laravel-medialibrary — mature, Eloquent-native, handles conversions, responsive images, and multi-disk storage. Adopting a Symfony bundle into Laravel is an adapter-maintenance tax with no upside.vich/uploader-bundle (widely adopted, Doctrine-integrated) or oneup/uploader-bundle (chunked/large uploads) before a 1-star package.PM guidance: treat this as a reference implementation and a build-vs-buy data point, not a dependency commitment. The expected value is in what you learn reading it, not in what you ship with it.
For executives (one paragraph): We evaluated an open-source PHP package for handling file attachments. It is a small, early-stage Symfony component with essentially no adoption — one GitHub star, no downstream dependents, a single maintainer, and no indication of production use. It solves a real but narrow problem (linking files to database records), and it solves it only for Symfony applications; our Laravel services would require custom adapter work to use it. My recommendation is not to adopt it as a dependency. File attachment is common enough that mature alternatives exist for both frameworks, and building the ~200-line core ourselves is cheap and gives us full control over security, retention, and storage — areas where a one-person package is a liability rather than a shortcut. The cost of this decision is near zero; the cost of the alternative, if it stalls, is a migration on a code path that touches customer data.
For engineering (the short version):
AttachmentService interface with a pinned version — do not let bundle types leak into domain code.vich/uploader-bundle and spatie/laravel-medialibrary before committing; the incumbent's adoption is the strongest signal we have.How can I help you explore Laravel packages today?