Repository navigation
Update spatie/phpunit-snapshot-assertions requirement from ^4.2 to ^5.4 - #76
Conversation
Updates the requirements on [spatie/phpunit-snapshot-assertions](https://github.com/spatie/phpunit-snapshot-assertions) to permit the latest version. - [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@4.2.0...5.4.0) --- updated-dependencies: - dependency-name: spatie/phpunit-snapshot-assertions dependency-version: 5.4.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
…patie/phpunit-snapshot-assertions-tw-5.4
Use PHPUnit 12.5 and snapshot assertions 5.4 on PHP 8.3+. Preserve snapshot IDs and output while migrating test discovery and coverage configuration. Fail CI for missing, changed, skipped, or incomplete snapshots and assert CLI exit-code boundaries. Amp-Thread-ID: https://ampcode.com/threads/T-01a1b0b6-c968-7245-92e0-79d833179d17
|
Review and compatibility corrections are in 31db5ad. The original failure was Composer rejecting snapshot assertions 5.4 on PHP 8.0. This branch now requires PHP 8.3+, uses bugfix-supported PHPUnit 12.5, migrates all 25 tests to attributes without renaming their snapshots, and retains PHP 8.3–8.6 coverage from #77. Runtime source, CLI output, and all 11 existing snapshots are unchanged. Symfony constraints remain unchanged; there is no Laravel dependency. Snapshot creation is disabled with a literal string environment value, and skipped/incomplete tests fail. Local negative controls verified missing snapshots fail without being created, mismatches fail, intentional creation is incomplete/nonzero, and a skipped test exits nonzero. The pre-migration tests were undiscoverable under PHPUnit 12; the migrated suite passes 25 tests/42 assertions, including found/ignored exit-code boundaries. Full local suites passed with Symfony 5.4, 6.4, and 7.4. PHPStan, Pint, Composer strict validation, platform checks, and audit passed without bypasses. Latest-head CI is still being followed before merge. The planned minor release is 1.3.0, explicitly dropping PHP 8.0–8.2. No runtime API/output changes are introduced. |
PHP 8.5 deprecates null array offsets. Preserve the existing empty-string cache key while still resolving null directories from the current working directory. Cover default and explicit settings across initial and cached reads. Regression fails before and passes after on PHP 8.5; all output snapshots remain unchanged. Amp-Thread-ID: https://ampcode.com/threads/T-01a1b0b6-c968-7245-92e0-79d833179d17
|
Final corrected head c728331 has all seven checks green, including PHP 8.3–8.6, PHPStan, and styling: https://github.com/spatie/x-ray/actions/runs/42214930754 The stricter suite exposed an existing PHP 8.5+ null-array-offset deprecation in configuration discovery. The follow-up fix explicitly preserves the old empty-string cache key without changing null/current-directory lookup semantics. Its public regression fails before the fix (three deprecations, exit 1) and passes after (four assertions); full suites now pass 26 tests/46 assertions. All 11 existing snapshots still match unchanged. Immediately before normal merging, refreshed main/head refs, full discussion/reviews and review threads, all checks, mergeability, exact-ref classic protection, branch metadata, and effective rules. main is explicitly unprotected with no effective rules; no admin bypass or auto-merge was used. Expected merge tree is identical to the verified head. PHP floor changes and all unreleased maintenance are disclosed for the planned 1.3.0 minor release. |
Updates the requirements on spatie/phpunit-snapshot-assertions to permit the latest version.
Release notes
Sourced from spatie/phpunit-snapshot-assertions's releases.
Changelog
Sourced from spatie/phpunit-snapshot-assertions's changelog.
... (truncated)
Commits
b5ad3efAdd update-snapshots wrapper binary (#245)2a5d1e0Simplify shutdown handler4c9076dFix tests on PHPUnit 12.5 and add binary tests1d1a7b6Drop without-creating-snapshots binary; restore env var on shutdownd6a3361Address review feedback0359118Fix styling4fe2045Add wrapper binaries to replace-d --update-snapshotssyntaxba48973Merge pull request #244 from spatie/dependabot/github_actions/dependabot/fetc...5f34651Bump dependabot/fetch-metadata from 3.0.0 to 3.1.06ef0a3aFix stylingDependabot 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)