lucatume/codeception-snapshot-assertions
Snapshot assertions for Codeception: compare arrays, JSON, or rendered HTML against stored snapshot files, creating them automatically on first run and reporting clear diffs when assertions fail.
require-dev Composer dependency with no runtime footprint.0.x. 0.5.0 normalizes spaces to underscores in data set names (PR #22), which means snapshot files previously written using a data set name containing spaces will no longer be matched. For suites with a handful of data sets this is a one-time regeneration pass; for a large suite it is a deliberate "accept new snapshots + eyeball the diff" chore. This is consistent with the package's pre-1.0 contract: pin the version in composer.json and budget small upgrade chores per minor bump.Look at it when all of the following hold:
Look elsewhere when:
spatie/phpunit-snapshot-assertions is the better-supported fit, and Laravel's own HTTP testing helpers already cover a lot of response-shape assertions.0.x package does not provide them; that is acceptable for test tooling, not for anything else.To executives: this is a small, free, development-only tool that makes it much cheaper to catch regressions in the large blocks of output our PHP tests produce today. It adds nothing to the shipped product's runtime, carries no licensing cost, and can be removed in an afternoon if it does not pay off. The trade-off to acknowledge is that it is an early-stage (0.x), single-maintainer open-source component, so we pin the version and accept occasional small maintenance chores — the 0.5.0 release is exactly that: an internal naming cleanup that may require regenerating a few stored snapshots. Low cost, low risk, contained to the test suite.
To engineering: the 0.5.0 change replaces spaces with underscores in snapshot data set names, so any snapshots written under a data set name containing spaces will fail to match and need regenerating — worth a quick grep before bumping. Beyond that, adoption is composer require --dev lucatume/codeception-snapshot-assertions pinned to 0.5.0, wire the module into existing Codeception suites, and commit snapshot files so CI diffs are reviewable. Keep it off production dependencies and out of any package's require block.
How can I help you explore Laravel packages today?