{"id":15226360,"url":"https://github.com/mpyw/phpunit-patch-serializable-comparison","last_synced_at":"2025-04-09T20:24:17.079Z","repository":{"id":46117083,"uuid":"379575304","full_name":"mpyw/phpunit-patch-serializable-comparison","owner":"mpyw","description":"Fixes assertSame()/assertEquals() serialization errors running in separate processes.","archived":false,"fork":false,"pushed_at":"2025-03-04T01:17:11.000Z","size":24,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T23:37:08.238Z","etag":null,"topics":["isolated","patch","php","phpunit","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpyw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-23T11:10:10.000Z","updated_at":"2025-03-04T01:17:14.000Z","dependencies_parsed_at":"2024-06-21T02:13:24.154Z","dependency_job_id":"7f7f535f-d0de-47b9-a8fb-ae60200ff858","html_url":"https://github.com/mpyw/phpunit-patch-serializable-comparison","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":"0.23529411764705888","last_synced_commit":"bb24fa624bf9ae72e62b861ee9fb9105d790d7bd"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphpunit-patch-serializable-comparison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphpunit-patch-serializable-comparison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphpunit-patch-serializable-comparison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpyw%2Fphpunit-patch-serializable-comparison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpyw","download_url":"https://codeload.github.com/mpyw/phpunit-patch-serializable-comparison/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248105315,"owners_count":21048500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["isolated","patch","php","phpunit","testing"],"created_at":"2024-09-28T20:04:47.165Z","updated_at":"2025-04-09T20:24:17.072Z","avatar_url":"https://github.com/mpyw.png","language":"PHP","readme":"# 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)\n\nFixes `assertSame()`/`assertEquals()` serialization errors running in separate processes.\n\n## Requirements\n\n- php: `\u003e=5.3.3`\n- [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit): `\u003e=4.8.0`\n- [sebastianbergmann/comparator](https://github.com/sebastianbergmann/comparator): `^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0`\n\n## Installing\n\n```bash\ncomposer require --dev mpyw/phpunit-patch-serializable-comparison\n```\n\n## Example\n\n```php\nclass AssertionTest extends TestCase\n{\n    protected function callAssertSameReceivingClosure(\\Closure $closure)\n    {\n        static::assertSame('aaa', 'bbb');\n    }\n\n    #[RunInSeparateProcess]\n    #[PreserveGlobalState(enabled: false)]\n    public function testAssertionIncludingUnserializableTrace()\n    {\n        static::callAssertSameInClosure(function () {});\n    }\n}\n```\n\n### Before Patching\n\n```\nPHPUnit\\Framework\\Exception: PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in Standard input code:XX\nStack trace:\n#0 Standard input code(XX): serialize(Array)\n#1 Standard input code(XX): __phpunit_run_isolated_test()\n#2 {main}\n  thrown in Standard input code on line XX\n```\n\n### After Patching\n\n```diff\nFailed asserting that two strings are identical.\n--- Expected\n+++ Actual\n@@ @@\n-'aaa'\n+'bbb'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpyw%2Fphpunit-patch-serializable-comparison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpyw%2Fphpunit-patch-serializable-comparison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpyw%2Fphpunit-patch-serializable-comparison/lists"}