Skip to content

Bump spatie/phpunit-snapshot-assertions from 5.3.2 to 5.4.0 - #137

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/composer/spatie/phpunit-snapshot-assertions-5.4.0
Open

Bump spatie/phpunit-snapshot-assertions from 5.3.2 to 5.4.0#137
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/composer/spatie/phpunit-snapshot-assertions-5.4.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 4, 2026

Copy link
Copy Markdown

Bumps spatie/phpunit-snapshot-assertions from 5.3.2 to 5.4.0.

Release notes

Sourced from spatie/phpunit-snapshot-assertions's releases.

5.4.0

What's Changed

  • Add vendor/bin/update-snapshots wrapper binary that sets UPDATE_SNAPSHOTS=true and runs PHPUnit. This replaces the previously documented phpunit -d --update-snapshots syntax, which abused PHPUnit's -d flag and produces a Failed to set "--update-snapshots=1" test runner warning since PHPUnit 12.5.12.
  • Drop the phpunit -d --without-creating-snapshots form from the README. Use the CREATE_SNAPSHOTS=false environment variable instead. The argv check is kept in shouldCreateSnapshots() for backwards compatibility.
  • The wrapper restores the prior UPDATE_SNAPSHOTS env var state on shutdown, so it does not leak a state mutation to any in-process code that runs after PHPUnit.
  • Reworded the "Snapshot does not exist" failure message and the "snapshots can be updated by..." prompt to point at the new approach.
  • shouldUpdateSnapshots() and shouldCreateSnapshots() now check the env var first, then fall back to the legacy CLI argument.
  • Fix tests on PHPUnit 12.5+, where mocks throwing AssertionFailedError are tracked as a test failure even when user code catches the exception. The expectFail helper now uses a plain RuntimeException carrying the expected message.

Closes #242.

Full Changelog: spatie/phpunit-snapshot-assertions@5.3.2...5.4.0

Changelog

Sourced from spatie/phpunit-snapshot-assertions's changelog.

5.4.0 - 2026-04-29

What's Changed

  • Add vendor/bin/update-snapshots wrapper binary that sets UPDATE_SNAPSHOTS=true and runs PHPUnit. This replaces the previously documented phpunit -d --update-snapshots syntax, which abused PHPUnit's -d flag and produces a Failed to set "--update-snapshots=1" test runner warning since PHPUnit 12.5.12.
  • Drop the phpunit -d --without-creating-snapshots form from the README. Use the CREATE_SNAPSHOTS=false environment variable instead. The argv check is kept in shouldCreateSnapshots() for backwards compatibility.
  • The wrapper restores the prior UPDATE_SNAPSHOTS env var state on shutdown, so it does not leak a state mutation to any in-process code that runs after PHPUnit.
  • Reworded the "Snapshot does not exist" failure message and the "snapshots can be updated by..." prompt to point at the new approach.
  • shouldUpdateSnapshots() and shouldCreateSnapshots() now check the env var first, then fall back to the legacy CLI argument.
  • Fix tests on PHPUnit 12.5+, where mocks throwing AssertionFailedError are tracked as a test failure even when user code catches the exception. The expectFail helper now uses a plain RuntimeException carrying the expected message.

Closes #242.

Full Changelog: spatie/phpunit-snapshot-assertions@5.3.2...5.4.0

Commits
  • b5ad3ef Add update-snapshots wrapper binary (#245)
  • 2a5d1e0 Simplify shutdown handler
  • 4c9076d Fix tests on PHPUnit 12.5 and add binary tests
  • 1d1a7b6 Drop without-creating-snapshots binary; restore env var on shutdown
  • d6a3361 Address review feedback
  • 0359118 Fix styling
  • 4fe2045 Add wrapper binaries to replace -d --update-snapshots syntax
  • ba48973 Merge pull request #244 from spatie/dependabot/github_actions/dependabot/fetc...
  • 5f34651 Bump dependabot/fetch-metadata from 3.0.0 to 3.1.0
  • 6ef0a3a Fix styling
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [spatie/phpunit-snapshot-assertions](https://github.com/spatie/phpunit-snapshot-assertions) from 5.3.2 to 5.4.0.
- [Release notes](https://github.com/spatie/phpunit-snapshot-assertions/releases)
- [Changelog](https://github.com/spatie/phpunit-snapshot-assertions/blob/main/CHANGELOG.md)
- [Commits](spatie/phpunit-snapshot-assertions@5.3.2...5.4.0)

---
updated-dependencies:
- dependency-name: spatie/phpunit-snapshot-assertions
  dependency-version: 5.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants