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

Files Laravel Package

makinacorpus/files

A Laravel package for attaching and managing files on Eloquent models, with polymorphic file associations, configurable storage disks, image handling, and helpers for uploading, retrieving, and cleaning up stored files.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

The headline finding is a capability mismatch. The package description promises Laravel-shaped features — polymorphic file attachments, Eloquent traits and relationships, configurable validation, disk configuration. Hands-on inspection of the source describes something materially smaller: a plain, framework-agnostic library exposing a File object over PHP stream wrappers (exists, isFile, getSize, getMTime, open, unlink, rename, copy, path helpers), with no service provider, no facade, no config file, and no Flysystem bridge. For a TPM this is the most important input in the whole evaluation, because it means the published description cannot be used to scope work or to brief stakeholders. Treat every capability claim in the README as unverified until an engineer confirms it in src/. A vendor whose description overstates scope by this margin is a vendor whose issue tracker and roadmap cannot be trusted either.

Architecture fit is poor in a Laravel context. File handling is a solved problem in this stack: Storage facade, Flysystem adapters, UploadedFile validation rules, queue-friendly temporary URLs, and streaming responses all ship first-party. A thin File value object over native PHP stream functions occupies the same conceptual space with less coverage. Any adoption therefore has to justify itself on a capability delta that has not yet been demonstrated. The second fit question is lineage: Makina Corpus is historically Symfony-oriented, so confirm whether this is genuinely framework-agnostic PHP or a Symfony component in disguise. If it drags in Symfony contracts, fit with Laravel degrades further.

Integration feasibility is mechanically trivial and substantively unverified. Composer-installable, presumably PSR-4, no auto-discovery — so installation costs minutes and wiring costs a day. The unknowns that matter are in composer.json: PHP version constraints, any Illuminate constraint, and which Flysystem lineage (if any) is expected. With zero dependents there is no reference integration to copy, no downstream project proving a working configuration, and no public example of the package used alongside Eloquent or a queue worker.

Technical risk is dominated by two non-functional factors. First, GPL-2.0 on a library that links into application code is a copyleft obligation most commercial and SaaS products cannot accept without counsel sign-off; the Laravel ecosystem convention is MIT/Apache-2.0 for exactly this reason. This is the single cheapest reason to stop, and it is decided by legal, not engineering. Second, zero stars and zero dependents means no independent code review, no downstream bug discovery, no security disclosure channel, and effectively a single maintainer. File handling is an adversarial surface — path traversal, MIME/extension mismatch, zip bombs, TOCTOU on rename, symlink escape, world-readable upload directories — so a library with no observable security process must be assumed unsafe until audited.

Key questions to put to the maintainer or resolve internally before spending engineering time:

  • What does this provide that Storage + Flysystem does not already provide, concretely and quantifiably?
  • Is it framework-agnostic, or does it require Symfony components or specific Laravel/PHP constraints?
  • Which Flysystem major version, if any? Is there a CI matrix and a phpunit.xml?
  • Does it wrap Flysystem or reimplement filesystem primitives? (The latter is a rewrite of a genuinely hard problem.)
  • Is there a security policy, and who receives vulnerability reports?
  • Is a relicensing or commercial-license exception available from Makina Corpus?
  • What is the last commit date and issue/PR history relative to the current PHP release?

Integration Approach

Stack fit: do not adopt as a default. The correct posture is to treat this as a candidate to be benchmarked against a known-good alternative, not a dependency to be installed. If a spike does reveal a real gap, adopt it strictly behind an internal FileStore interface of our own design, so the package is never referenced directly from controllers, jobs, or domain services. That boundary is what makes the dependency removable later, and given the adoption signal, removability is the primary design requirement.

Migration path: greenfield only. With zero dependents there is no incumbent usage to migrate from, and retrofitting this underneath an existing Storage-based layer would create dual write paths and inconsistent disk semantics — two ways to normalize a path, two overwrite policies, two permission models. That divergence is expensive and tends to surface only in production. Adoption, if any, should be confined to a new bounded context.

Compatibility checks before any spike: declared php constraint versus our runtime; presence or absence of an Illuminate constraint; Flysystem major version; existence of CI and a test suite; use of dynamic properties or other PHP 8.2+ deprecations; and whether the package registers global helpers or facades that could collide with framework services.

Sequencing, with owners and exit criteria:

  1. Legal review of GPL-2.0 propagation — hard gate, done first, because it can terminate the evaluation for the price of an email. Owner: legal/product counsel. Exit criteria: written position on whether linking is acceptable for our distribution model.
  2. Source read of the public API and filesystem primitives — half a day of senior engineering time. Exit criteria: a one-page capability delta versus Storage, written down so knowledge does not live in one head.
  3. Timeboxed spike (2–3 days) reimplementing one existing upload flow against the package, behind an adapter interface, with the security checklist applied. Exit criteria: passes or fails against named criteria, not "looks fine."
  4. Comparative decision against Storage plus a thin internal wrapper. Default to the framework unless the spike shows a concrete, quantifiable advantage.
  5. If and only if adopted: fork to an internal namespace, pin the commit, vendor it, and name an owner before the first line ships.

Operational Impact

Maintenance: assume we own the code from day one. Zero dependents means upstream fixes arrive on the maintainer's timetable or not at all. Plan for a maintained internal fork with a documented patch process, a named owner, and recurring budget for PHP-version and Flysystem-major upgrades — work the framework would otherwise absorb for us for free. This is the hidden cost that a "simple API" framing obscures.

Support: no vendor SLA and no community. There is no forum footprint, no Stack Overflow corpus, no third-party blog posts to consult at 2am. Makina Corpus is a services organization, so realistic support means a paid consulting engagement — viable if we already have a relationship, otherwise a dead end. Internal knowledge will concentrate in whoever performs the source read; write that review down or carry a bus factor of one.

Scaling: mostly inherited, with two open questions. Throughput and concurrency are governed by the underlying disk or object store, not this wrapper, so that is probably not the constraint. The risks are streaming and chunked upload behavior for large files, memory profile on multi-hundred-megabyte uploads, and whether any operation is atomic. If the library reads whole files into memory, it becomes a scaling incident the first time someone uploads a video.

Failure modes to test explicitly in our adapter suite, because we cannot rely on upstream coverage we have not seen: silent overwrite on filename collision; partial writes left behind after an exception; orphaned files when a database transaction rolls back after a successful put; path traversal via unsanitized filenames; incorrect MIME inference; permission errors surfacing as uncaught generic exceptions rather than typed ones; and non-atomic rename across filesystems.

Ramp-up is small; ownership is not. A mid-level Laravel developer should be productive with the API in under a day. The trap is that the learning cost is trivial while the total cost of ownership is not: the real effort is auditing the code, writing and maintaining the wrapper, forking, and defending the license position on every release. Recommendation to the business: do not adopt. Use Laravel's native storage layer, spend the saved effort on upload hardening (MIME sniffing, size caps, storage-outside-webroot, signed URLs), and keep this package as a due-diligence data point demonstrating that the "file handling" category is commoditized — differentiation has to come from media processing, virus scanning, and retention policy, not from a file API wrapper.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin