michaeldrennen/local-file
A lightweight Laravel package for working with files on the local filesystem. Read, write, and manage local files through a simple, expressive API that keeps file handling clean and consistent in your PHP applications.
file_get_contents, file_put_contents, fopen/fclose, filesize, unlink, etc.). The capability it delivers is measured in dozens of lines, not thousands. Unless it is already in the codebase, the decision it supports is "write the helper ourselves" — you keep ownership, avoid a stale dependency, and lose nothing functionally.file_* calls, and bespoke helper classes). The decision is to standardise, not to add a fourth path.Reasonable conditions for adoption:
michaeldrennen/* packages and want API consistency across a small internal toolkit.When to look elsewhere:
Storage facade / Flysystem. You get abstraction over local and cloud disks, fake-able filesystems for tests, and first-party maintenance. This is almost always the right call.symfony/filesystem, league/flysystem, or spatie/* equivalents — all actively maintained.For executives (30 seconds): A small, MIT-licensed PHP utility for common local file operations. It is low-risk in the sense that it is tiny and free, and low-value in the sense that it does not enable any capability we couldn't build ourselves in a day. Adoption is a tactical engineering convenience, not a strategic investment. Recommendation: do not add it as a production dependency. If a team wants it for internal scripting, allow it with the understanding that we own maintenance, and default everyone else to Laravel's built-in filesystem layer.
For engineering (the real conversation): The functionality overlaps almost entirely with native PHP and with Laravel's Storage facade, which we already have, which is tested, and which other teams already know. The package has 3 stars, 0 dependents, and its last release was March 2021 — meaning no PHP 8.x upkeep, no security response, and no community to catch bugs. If a specific helper in it is genuinely nicer than what we have, port that helper into our own codebase (attribution is trivial under MIT) rather than taking the dependency. That gives us the ergonomic win with none of the vendor risk, and keeps our dependency graph honest.
Net PM position: Nice-to-have for throwaway work; not a dependency worth defending in a review. Spend the decision budget on standardising file handling across the codebase instead — that is the durable win.
How can I help you explore Laravel packages today?