fix: limit laravel/serializable-closure to <2.0.9#123
Open
esetnik wants to merge 2 commits intocrunzphp:3.9from
Open
fix: limit laravel/serializable-closure to <2.0.9#123esetnik wants to merge 2 commits intocrunzphp:3.9from
esetnik wants to merge 2 commits intocrunzphp:3.9from
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
| /** | ||
| * @internal | ||
| */ | ||
| class TaskRunnerStub |
Member
There was a problem hiding this comment.
Please use anonymous classes or mocks/stubs instead
Member
|
Also, please target |
Author
Done |
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