php-extended/php-file-interface
php-extended/php-file-interface provides PHP contracts for file and directory abstractions, covering paths, metadata, content access, and filesystem operations. It enables consistent, implementation-agnostic file handling across compatible php-extended packages.
The package is an interface-only contract library: it ships no implementation, no service provider, no facade, and no Laravel auto-discovery metadata. Everything that actually touches a file is code we would have to write and own. That is the central architectural fact and it reframes the evaluation from "should we integrate this package" to "should we adopt this vocabulary and fund an adapter."
Architecture fit. Poor-to-neutral. Laravel's filesystem story is already two layers deep: Illuminate\Filesystem\Filesystem wraps symfony/filesystem, and the Storage facade wraps Flysystem, which supplies local/S3/FTP drivers, stream handling, visibility semantics, and path normalization. Introducing php-file-interface creates a third, parallel contract layer whose only distinguishing feature is vendor neutrality we do not need inside an application (as opposed to inside a framework-agnostic library). The package would fit naturally in a domain layer that must not depend on Laravel — for example a shared package used by both a Laravel app and a non-Laravel worker. If that constraint does not exist, the abstraction is cost without benefit.
Integration feasibility. Mechanically straightforward, economically unattractive. Writing a class that implements FileInterface et al. over Illuminate\Filesystem\Filesystem or Storage::disk() is a day or two of work. The problem is that "a day or two" is the optimistic case and is unbounded in the realistic case: the interface surface is defined by the upstream authors, not by our use cases, and every gap (atomic writes, streamed reads, symlink resolution, mime detection, permission semantics, exceptions) becomes our code. With zero dependents and zero stars, there is no reference implementation to crib from, no third party that has already hit the edge cases, and no ecosystem of adapters.
Technical risk. Dominated by maintenance and dependency-graph risk rather than runtime risk, since the package contributes essentially no runtime code.
psr/* or Symfony component version is the most likely failure mode, and it surfaces as "we cannot upgrade Laravel" — a high-severity, hard-to-schedule problem discovered at the worst time.Key questions for the maintainer / spike.
symfony/filesystem plus Flysystem do not, given we are an application and not a framework-agnostic library?FileNotFoundException / Flysystem's UnableTo* family?Stack fit. Weak. Laravel's conventions assume packages that either provide a service provider or slot into an existing facade. This package does neither, so adoption means hand-registering a binding in AppServiceProvider for every interface in the set, plus a facade or helper if we want ergonomics. That is bespoke glue for every project that adopts it, which is the definition of a non-standard integration.
Migration path. There is no migration to perform because there is nothing to migrate from — adopting the package does not replace Storage or Filesystem, it sits beside them. The correct framing is greenfield adapter development:
Illuminate\Filesystem\Filesystem for local operations and over Storage::disk() for driver-agnostic operations, so Flysystem continues to own the actual I/O, path handling, and cloud drivers.Compatibility. Three concrete checks before any code is written:
composer why-not against our PHP and Laravel versions — resolve the full php-extended peer set, not just this package.Sequencing. If we proceed, the order is: (1) one-day spike resolving the dependency graph on the current Laravel version, timeboxed and abandonable; (2) inventory of the interface methods we would actually call, mapped against Flysystem equivalents, to quantify genuine gaps; (3) write the adapter behind our internal port with contract tests; (4) only then allow a single non-critical consumer (a report exporter or cache warmer) to use it. Do not start with uploads, billing document storage, or anything on the critical path. If step 1 produces any composer conflict, stop — the expected value is already negative.
My recommendation. Do not adopt as a dependency for Laravel services. Use it as a design reference if we want a vendor-neutral file contract, and write that contract ourselves in ten methods. The exception is a genuine framework-agnostic shared library that must not depend on Illuminate — the one scenario where this package's shape is correct, and even there I would vendor the interfaces rather than depend on GitLab for them.
Maintenance. The upstream artifact is near-zero maintenance — interfaces do not rot. The operational burden is entirely ours: we own the adapter, the contract tests, and every bug at the seam between the interface's semantics and Flysystem's. Budget it as an internal component with an external dependency, not as a library we consume. The realistic steady-state cost is small but permanently nonzero, and it lands on whoever owns the platform layer.
Support. Effectively none. No commercial backing, no Slack, no Stack Overflow corpus, negligible issue traffic. Internal engineers will debug by reading source, which is at least short. Escalation path for an upstream defect is "file a GitLab issue and wait, or fork." Plan on fork rights being part of the decision — this is only viable if we are comfortable maintaining a fork of a few hundred lines of interface definitions.
Scaling. Runtime impact is nil; interfaces compile away and the adapter adds one dispatch per call, invisible next to syscalls and network I/O. Developer scaling is the real constraint: every new engineer must learn a filesystem vocabulary that is neither Laravel's nor Flysystem's, and onboarding docs for a zero-star package write themselves. For a team of five this is a wash; for a team of fifty it is a recurring tax.
Failure modes, ranked.
composer update. Mitigation: commit the lockfile, and never let this dependency float in CI.Ramp-up. Reading the package is minutes. Understanding the abstraction is hours. The cost is not learning the library — it is the ongoing decision overhead of "do I use Storage, Filesystem, or the interface here," which is exactly the kind of ambiguity that produces inconsistent codebases. Ramp-up for a new hire on a codebase that uses all three is materially worse than one that uses Storage.
Bottom line. Low-risk at runtime, high-risk in the dependency graph, and the value proposition does not survive contact with an application that already has Flysystem. The opportunity score suggests the shape is sound and the adoption is absent. Treat it as prior art, not as a dependency.
How can I help you explore Laravel packages today?