Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug related to readonly properties #87

Merged
merged 3 commits into from
Aug 1, 2024
Merged

Conversation

rust17
Copy link
Contributor

@rust17 rust17 commented Jul 31, 2024

This pull request fix this issue where an exception is thrown during the unserialize process when Bus::chain handles a class that includes a readonly property. The exception message is: Cannot modify readonly property Illuminate\Tests\Integration\Queue\ReadonlyEnumTestJob::$enum.

@rust17
Copy link
Contributor Author

rust17 commented Aug 1, 2024

According to this comment, let me take another look at the code.

@driesvints
Copy link
Member

Based on laravel/framework#51877 (comment) I'll close this for now but definitely appreciate the help here 👍 Just want to prevent this from getting merged unwanted. Feel free to continue the discussion and send in a new PR if you figure things out. Thanks!

@driesvints driesvints closed this Aug 1, 2024
@rust17
Copy link
Contributor Author

rust17 commented Aug 1, 2024

@driesvints Never mind. Based on laravel/framework#51877 (comment), the fix is feasible. Should I go ahead and resubmit the same PR?

@driesvints driesvints reopened this Aug 1, 2024
@driesvints
Copy link
Member

@rust17 re-opened this one for ya 👍

@driesvints
Copy link
Member

Btw @rust17. Most likely this PR will require a test so would be good if you could add one.

There's also this previous attempt that you might wanna read through for more info: #58

@rust17
Copy link
Contributor Author

rust17 commented Aug 1, 2024

Alright, just give me some time.

@driesvints driesvints marked this pull request as draft August 1, 2024 13:09
@rust17
Copy link
Contributor Author

rust17 commented Aug 1, 2024

Thank you for the background information and the test case included in this PR. This test case shows that removing the fix code reproduces the bug caused by the readonly property, while adding the code resolves it.

@driesvints driesvints marked this pull request as ready for review August 1, 2024 15:15
@driesvints driesvints requested a review from taylorotwell August 1, 2024 15:15
@taylorotwell taylorotwell merged commit b88b3bf into laravel:master Aug 1, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bus::chain Skipping jobs with readonly non-scalar properties
3 participants