Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filesystem Laravel Package

zenstruck/filesystem

Zenstruck Filesystem is a Symfony bundle for attaching files and images to Doctrine entities. It handles storage via Flysystem adapters, image transformations, metadata, and automatic orphan cleanup, keeping file management clean and testable.

Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping for uploads/media: Informs whether "file & image attachment with automatic lifecycle management" is a table-stakes feature you build in a sprint or a pattern you copy. The bundle's core value — File/Image value objects, Doctrine mapping, orphan cleanup — maps directly to a recurring roadmap item (avatars, documents, product galleries, CMS assets) that most products hit in their first year.
  • Build vs. buy (or build vs. borrow): The package is a reference architecture more than a drop-in dependency for a Laravel team. It supports the decision of whether to adopt a bundle or replicate its proven design (value objects + Flysystem adapter + lifecycle hooks + test helpers) in your own laravel-medialibrary-style layer.
  • Storage strategy: Because storage is abstracted through Flysystem, it supports the roadmap decision to start local and migrate to S3/R2/GCS without rewriting entity code — a cost-avoidance argument that resonates with finance as much as engineering.
  • Data-integrity and cleanup policy: Orphan removal is a product decision, not just a technical one — it determines whether deleted records leak storage costs and GDPR-relevant residue. This package's opinionated stance gives you a baseline to copy or consciously reject.
  • Testability as a quality bar: The "test-friendly APIs for asserting file behavior" signal supports a decision to require assertable file contracts in your own media layer, reducing QA cycles on upload regressions.
  • Not supported: A framework-migration decision. This is a Symfony bundle; it does not inform a Laravel architecture choice except by analogy.

When to Consider This Package

  • You are on Symfony, not Laravel. This is the single most important filter. If your stack is Laravel, the package cannot be installed or used idiomatically, and the correct outcome is to treat it as a design reference, not a dependency. Laravel equivalents (e.g., spatie/laravel-medialibrary, plank/laravel-mediable) should be the actual candidates.
  • You are on Symfony + Doctrine and repeatedly hand-roll file-upload plumbing across entities. The boilerplate-reduction story is genuinely strong here.
  • You already use Flysystem and/or LiipImagineBundle — the integration surface is the main reason to pick this over a roll-your-own trait.
  • You need orphan cleanup and value-object semantics and do not want to own that logic.
  • Look elsewhere if: you need a large, actively-maintained ecosystem with extensive documentation and community support (43 stars and a small maintainer footprint is a real concentration risk for a production dependency); you need a framework-agnostic solution; you have complex asset requirements (variants, transformations pipelines, CDN invalidation, signed URL policies) that exceed what this bundle covers; or your organization requires vendor SLAs and long-term support commitments.
  • Do not adopt if your team lacks the capacity to fork or pin the package — with a small maintainer base, you should assume you may need to maintain it internally.

How to Pitch It (Stakeholders)

To executives (one paragraph): We evaluated a mature pattern for handling file and image uploads in our backend. The package itself is Symfony-specific and small (roughly 43 GitHub stars), so we should not treat it as a long-term vendor dependency — but it encodes a clean, proven design: uploads become first-class objects, storage is swappable between local and cloud, unused files are cleaned up automatically, and behavior is easy to test. For a Laravel codebase the recommendation is to adopt the pattern via a maintained Laravel-native library, or replicate the four design ideas internally. The decision is low-cost either way, and it removes a recurring source of bugs, storage leakage, and compliance exposure around deleted media. We do not recommend taking a hard dependency on this specific package unless we are a Symfony shop.

To engineering (bullet form):

  • What it is: A Symfony bundle that attaches File/Image value objects to Doctrine entities and manages persistence, deletion, and orphan cleanup automatically.
  • Why it's relevant to us: It is a well-formed reference for the media layer we keep rebuilding — value objects, Flysystem abstraction, lifecycle hooks, and assertable test APIs.
  • Why we're not installing it: We are on Laravel; it is Doctrine/Symfony-coupled, and its maintainer base is thin. Adoption risk outweighs the boilerplate savings.
  • What we should do instead: Choose a Laravel-native media package (shortlist and spike), or build a thin internal layer that copies these four ideas — swappable storage adapter, value-object wrapper, automatic orphan cleanup on entity deletion, and file-assertion helpers for tests.
  • What we need from you: An estimate for the spike (roughly one sprint) and a recommendation on buy vs. build, including a storage-migration plan to cloud object storage.

Risks to state plainly: Framework mismatch (primary blocker for Laravel), low star count and maintenance concentration risk, and unknown long-term support. These are the reasons the recommendation is pattern adoption rather than dependency adoption.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment