All notable changes to phpunit-snapshot-assertions
will be documented in this file
- Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in #207
- Bump aglipanci/laravel-pint-action from 2.4 to 2.5 by @dependabot in #208
- Allow phpunit 12 by @mfruehauf in #209
- @mfruehauf made their first contribution in #209
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.7...5.1.8
- Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0 by @dependabot in #203
- Bump oven-sh/setup-bun from 1 to 2 by @dependabot in #202
- gha: run tests against PHP 8.4 too by @erikn69 in #204
- Improve readability of generated JSON snapshots by @ostrolucky in #205
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.6...5.1.7
- Update symfony version in deps by @Niolak in #196
- Fix/v4 permissions snapshot files by @Niolak in #201
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.16...4.2.17
- Minor updates and improvements by @patinthehat in #192
- Bump aglipanci/laravel-pint-action from 2.3.1 to 2.4 by @dependabot in #194
- Bump dependabot/fetch-metadata from 2.0.0 to 2.1.0 by @dependabot in #200
- chmod snapshot folders and files by @Niolak in #199
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.5...5.1.6
- @simonhammes made their first contribution in #187
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.4...5.1.5
- Bump aglipanci/laravel-pint-action from 2.3.0 to 2.3.1 by @dependabot in #183
- Allow phpunit 11 by @mfn in #185
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.3...5.1.4
- @janatjak made their first contribution in #182
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.2...5.1.3
- Bump actions/setup-node from 2 to 3 by @dependabot in #176
- fix: correct typo in readme by @TSchuermans in #178
- Fix #179 - assert difference between empty array and object. by @Sam152 in #180
- Bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in #177
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.1...5.1.2
- fix image driver
- Add image assertions by @freekmurze in #175
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.0.2...5.1.0
- Generate snapshot file names with dataset by @pierres in #163
- Bump aglipanci/laravel-pint-action from 0.1.0 to 2.1.0 by @dependabot in #164
- Update windows users info in readme.md by @raveren in #150
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.0.0...5.0.1
- Add Dependabot Automation by @patinthehat in #152
- Add PHP 8.2 Support by @patinthehat in #151
- Bump actions/checkout from 2 to 3 by @dependabot in #153
- Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in #159
- Fix badge with
run-tests
status inREADME.md
by @gomzyakov in #160 - add support for PHPUnit v10 by @freekmurze in #154
- @patinthehat made their first contribution in #152
- @dependabot made their first contribution in #153
- @gomzyakov made their first contribution in #160
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.16...5.0.0
- serialize empty HTML by @Khartir in #148
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.15...4.2.16
- Apply PCRE_UTF8 for cleaning filename by @su-kun1899 in #147
- @su-kun1899 made their first contribution in #147
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.14...4.2.15
- Add tests for Text Driver and Windows EOL fixes by @mallardduck in #146
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.13...4.2.14
- Add test to cover HTML without doctype by @mallardduck in #144
- Add type safe json matching by @cschindl in #145
- @cschindl made their first contribution in #145
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.12...4.2.13
- Use
LIBXML_HTML_NODEFDTD
to maintain output consistency by @JayBizzle in #141
- @JayBizzle made their first contribution in #141
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.11...4.2.12
- revert match process in JsonDriver by @Stevemoretz in #138
- @Stevemoretz made their first contribution in #138
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.10...4.2.11
- Normalize windows line endings on HTML tests by @mallardduck in #136
- @mallardduck made their first contribution in #136
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.9...4.2.10
- Do not convert stdClass to array && remove outdated piece of code by @alshenetsky in #134
- @alshenetsky made their first contribution in #134
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.8...4.2.9
- @gndk made their first contribution in #132
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.7...4.2.8
- clean filenames on MatchesFileSnapshot for Windows (#130)
- allow using env vars to manage snapshot creation and update (#126)
- add support for PHP 7.3
- add support for PHP 8
- migrate phpunit config
- moves default implementation of snapshot directory/id to concerns directory (#99)
- Fix exception message
- Fixed inconsistent line endings
- Improved Windows support
- Added
--without-creating-snapshots
flag
Snapshots generated with assertMatchesSnapshot
will break when upgrading to this version. The easiest way to upgrade is to ensure your snapshot tests pass, delete your snapshots, upgrade the package, then rerun the tests to generate new snapshots.
- New snapshot formats when using
assertMatchesSnapshot
: scalars (strings, integers & floats) are serialized totxt
files, objects & arrays are serialized toyaml
files - New
TextDriver
to store snapshots intxt
files - New
ObjectDriver
to serialize data to YAML and store snapshots inyaml
files - Removed
VarDriver
- Add support for PHPUnit 9 (#86)
- Drop support for PHP 7.3
assertMatchesJsonSnapshot
now supports all JSON serializable objects, and won't convert empty arrays to obejcts anymore
- Allow symfony 5 components
- Added an
assertMatchesHtmlSnapshot
assertion
- Allow recursive mkdir for file snapshots
- Less restrictive symfony/yaml version requirement
- Fix for json driver
- Require PHPUnit 8 & PHP 7.2
- Use YAML by default for associative arrays
- Drop PHP 7.0 support, the new constraint is ^7.1
- Drop PHPUnit ^6.5 support, the new constraint is ^7.0
- Fix JSON array comparisons
- Allow arrays to be serialized to JSON
- Fix updating failed file-snapshots
- Fix for tests with weird characters
- Lowered minimum required PHPUnit version
- Only mark test incomplete after every snapshot has been run
- Fixed snapshot creation in recursive directories
- Support PHP 7.2
- Support phpunit ^7.0
- Added
assertMatchesFileSnapshot
- Fixed
assertMatchesFileHashSnapshot
- Added
assertMatchesFileHashSnapshot
assertion
- Added
example
folder to.gitattributes
- Fixed expected and actual argument order when making json assertions
- Added a reminder how to update snapshots when a snapshot assertion fails
- Initial release