protonemedia/laravel-minio-testing-tools
Testing helpers for Laravel that make it easy to use MinIO, the S3-compatible object storage server, in your test suite. Spin up buckets, configure filesystem disks, and assert file uploads without touching real AWS S3, keeping tests fast, isolated, and repeatable.
Storage facade. That de-risks the decision to standardize on S3-compatible storage instead of local disk or a database blob column.localstack, or mocking. This package is a thin trait that removes boilerplate — it turns "should we invest a sprint in a reliable object-storage test harness?" into "add a dev dependency."Adopt it when:
s3 filesystem driver, and you want tests that exercise real HTTP calls against an S3-compatible endpoint.Storage, which hides serialization and path bugs, or (b) hitting a shared staging bucket, which introduces flakiness and cross-test pollution.Look elsewhere when:
localstack or custom MinIO setup and the migration cost exceeds the boilerplate saved.To executives: This is a small, MIT-licensed developer tool that makes our automated tests behave more like production when it comes to file storage. It costs nothing to adopt, requires no new infrastructure contract, and removes a recurring source of "works in tests, breaks in production" bugs on upload and download features. It also keeps AWS spend and credentials out of our CI pipeline. The latest release (1.7.0) is routine maintenance — dependency bumps plus PHP 8.5 compatibility — so adopting it now also keeps us clear of a future upgrade blocker. Risk is low because the package is a thin wrapper we could absorb into our own codebase in an afternoon if needed — but it is not strategically important, so do not frame it as a platform investment.
To engineering: Add this as a dev-only dependency to run tests against a real MinIO S3 server instead of mocking the Storage facade. You get genuine coverage of presigned URLs, multipart uploads, streaming downloads, and path/mimetype handling — the exact areas mocks misrepresent. It keeps CI hermetic and credential-free. 1.7.0 contains no breaking changes or API surface additions: it adds PHP 8.5 to the support matrix and refreshes CI tooling, so bumping within the 1.x line is a low-risk, non-code-touching change. Caveats to accept up front: low adoption and a single maintainer — the 1.7.0 release shows the package is still being kept alive, but treat the trait as something we may need to vendor; and it only pays off if we are actually on the S3 driver, so confirm that before we invest in wiring it into the suite.
How can I help you explore Laravel packages today?