PHPackages                             mpyw/phpunit-patch-serializable-comparison - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. mpyw/phpunit-patch-serializable-comparison

ArchivedLibrary[Testing &amp; Quality](/categories/testing)

mpyw/phpunit-patch-serializable-comparison
==========================================

Fixes assertSame/assertEquals serialization errors running in separate processes.

v1.0.0(2w ago)15262.3k↓55.3%2MITPHPPHP &gt;=5.3.3CI passing

Since Jun 23Pushed 2w ago2 watchersCompare

[ Source](https://github.com/mpyw/phpunit-patch-serializable-comparison)[ Packagist](https://packagist.org/packages/mpyw/phpunit-patch-serializable-comparison)[ RSS](/packages/mpyw-phpunit-patch-serializable-comparison/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

PHPUnit Patch Serializable Comparison [![Status](https://github.com/mpyw/phpunit-patch-serializable-comparison/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/mpyw/phpunit-patch-serializable-comparison/actions)
==========================================================================================================================================================================================================================================

[](#phpunit-patch-serializable-comparison-)

Fixes `assertSame()`/`assertEquals()` serialization errors running in separate processes.

Important

**`sebastian/comparator` `8.2.0` fixes this upstream**, so this patch is only needed below that version. See [sebastianbergmann/comparator#158](https://github.com/sebastianbergmann/comparator/issues/158): as of `8.2.0`, `ComparisonFailure` implements `__serialize()`/`__unserialize()` and can be serialized across process-isolation boundaries even when its stack trace references non-serializable objects (e.g. a `PDO` passed as a method argument) — exactly the case this package works around. This package is therefore constrained to `sebastian/comparator` `=8.2` you do **not** need it (and shouldn't install it: it would override the upstream-fixed class).

Requirements
------------

[](#requirements)

- php: `>=5.3.3`
- [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit): `>=4.8.0`
- [sebastianbergmann/comparator](https://github.com/sebastianbergmann/comparator): `^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || >=8.0
