ralphjsmit/pest-plugin-filesystem
Pest plugin that adds expressive filesystem assertions to your test suite, so you can verify files and directories exist, contain expected content, or are empty without verbose PHP boilerplate. A small, focused helper for cleaner Pest tests.
Architecture fit. This is a development-only test dependency, and the TPM must frame it as tooling rather than platform. It layers expressive filesystem expectations onto Pest's expect() API — file exists, directory exists, contents match, path missing — replacing raw file_exists() / file_get_contents() scaffolding in tests. Critically, it has no runtime footprint: no service provider on the request path, no migrations, no storage driver, no production dependency edge. That single fact determines the entire evaluation lens. Runtime concerns (latency, throughput, upgrade blast radius on live traffic) are irrelevant; the real concerns are developer experience, assertion correctness, and maintenance risk. The package presupposes Pest — a PHPUnit-only suite extracts zero value — and Laravel is optional, with the only Laravel-specific signal in the sources being the 1.2.0 "Laravel 10 support" note.
Integration feasibility. High and cheap. Adoption is one composer require --dev line, and the pest-plugin-* naming convention implies auto-discovery. Time to a first green test is measured in minutes, and the package can be isolated to a single test file as a spike. The genuine feasibility gate is version resolution, not installation effort.
Technical risk. Low-to-medium: "low" because it is contained to test code and trivially removable, "medium" because it is stale.
composer audit coverage of dev dependencies are warranted.expect()->extend() in tests/Pest.php is plausibly 30–100 lines. Vendor risk is quantifiable as "an afternoon" — the correct lens for a 3-star, zero-dependent package.Key questions.
Storage? This decides whether it works with Storage::fake() disks or only real paths — a large usability difference and the determinant of whether it complements or duplicates Laravel's built-in helpers.--parallel / Paratest?Stack fit. Pest-based suites on PHP 8.1+, most plausibly Laravel applications but equally plain-PHP Pest projects. Not applicable to PHPUnit-only codebases, and not applicable where filesystem assertions target a remote or object-store disk rather than the local filesystem.
Migration path. Purely additive — no migration, and no obligation to touch existing raw file_exists() assertions. Present both outcomes as legitimate:
tests/Pest.php, wrapping native calls or adapting the package's approach under its MIT license. This removes the dependency at a cost comparable to adopting it.Compatibility. Verify rather than infer from one-line release notes: run composer why-not ralphjsmit/pest-plugin-filesystem 1.2 to see exactly what blocks resolution; read composer.json for pestphp/pest, phpunit/phpunit, and php constraints plus the extra.pest.plugins entry; and execute on the full CI matrix, not just a developer machine — including a non-Linux runner if one exists, since path handling is the likeliest divergence. Pin ^1.2 and commit the lockfile so resolution cannot drift back to 1.1.x.
Sequencing.
Maintenance. Assume we own it. Three stars, zero dependents, one release in 2023, and one-line release notes describe a personal utility project, not a maintained library. The realistic model: pin it, review the diff on any bump, and be ready to swap to local expectations. Budget an hour or two per quarterly dependency review — or spend that once on a shim and reach zero recurring cost.
Support. Community-only. No security policy, no SLA, no commercial backing. Mitigation is structural rather than contractual: dev-only scope, pinned version, composer audit in CI covering dev dependencies, and a documented exit plan. Dev dependencies execute inside CI and can read CI secrets, so provenance review applies here as much as to runtime packages.
Scaling. No runtime scaling dimension exists. The only scaling surface is CI behaviour: the helpers wrap native calls, so wall-clock cost is negligible. The real scaling risk is parallel execution — predictable temp paths can collide across workers and produce flaky, hard-to-reproduce failures that cost far more engineering time than the readability gain saves.
Failure modes.
Ramp-up. Very low for anyone already writing Pest tests; self-describing helpers are the entire value proposition. Two onboarding requirements make or break it: a short team style note stating when to use the helpers versus Storage::fake() and Laravel's built-in assertions, and a documented shim procedure so an engineer hitting a constraint failure at upgrade time knows the escape hatch exists and is cheap. Without those two artefacts, the package becomes an inconsistently applied dependency that a future upgrade removes by accident.
How can I help you explore Laravel packages today?