Repository navigation
fix: limit laravel/serializable-closure to <2.0.9 - #123
Merged
PabloKowalczyk merged 3 commits intoMar 20, 2026
Merged
Conversation
v2.0.9 introduced a change in Native.php (laravel/serializable-closure#122) that skips walking object properties when the object implements __serialize. This breaks crunz's closure serialization, causing "Serialization of 'Closure' is not allowed" errors in LaravelClosureSerializer::serialize(). Constrains the dependency to >=2.0 <2.0.9 until a compatible fix is available. Fixes crunzphp#122 Co-authored-by: Cursor <cursoragent@cursor.com>
Adds test coverage for closure serialization including a regression test for laravel/serializable-closure#126 where objects implementing __serialize with nested closure properties fail to serialize on v2.0.9+. Co-authored-by: Cursor <cursoragent@cursor.com>
| "composer-runtime-api": "^2.0", | ||
| "dragonmantank/cron-expression": "^3.4.0", | ||
| "laravel/serializable-closure": "^2.0", | ||
| "laravel/serializable-closure": ">=2.0 <2.0.9", |
Member
There was a problem hiding this comment.
Please use conflict section
Contributor
Author
There was a problem hiding this comment.
Fixed in 778be38. composer.json now keeps laravel/serializable-closure at ^2.0 and blocks >=2.0.9 via the conflict section.
Member
|
Also, please target |
Contributor
Author
Done |
Member
|
Thanks @esetnik |
esetnik
added a commit
to esetnik/crunz
that referenced
this pull request
Apr 8, 2026
The conflict added in crunzphp#123 blocked all versions >=2.0.9, but v2.0.11 includes the upstream fix (laravel/serializable-closure#129). Narrow the constraint to >=2.0.9, <2.0.11 so only the two broken releases (v2.0.9 and v2.0.10) are blocked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
esetnik
added a commit
to esetnik/crunz
that referenced
this pull request
Apr 8, 2026
The conflict added in crunzphp#123 blocked all versions >=2.0.9, but v2.0.11 includes the upstream fix (laravel/serializable-closure#129). Narrow the constraint to >=2.0.9, <2.0.11 so only the two broken releases (v2.0.9 and v2.0.10) are blocked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
laravel/serializable-closureto>=2.0 <2.0.9incomposer.jsonto avoid a breaking change introduced in v2.0.9Problem
laravel/serializable-closurev2.0.9 introduced a regression (laravel/serializable-closure#122) that modifiesNative::wrapClosures()andNative::mapByReference()to skip walking object properties when the object implements__serialize. This prevents the library from finding and wrapping closures nested inside those objects, causing:I verified this across all available versions:
The upstream issue has been reported: laravel/serializable-closure#126
Fix
Constrains the
laravel/serializable-closuredependency to>=2.0 <2.0.9until the upstream regression is resolved.Fixes #122