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 solo config being not seralizable #61

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

tobytwigger
Copy link
Contributor

Hey! First up, thanks for the excellent package.

This is a fix for #55 (exception being thrown when caching Laravel config due to the Commands class not being serializable.

I tried adding __serialize and __unserialize, but found it wasn't actually being called. Instead, it was expecting a __set_state function, caused by the cache command using var_dump.

image

The fix just sets __set_state to return a new instance, with every property set to the value set when registered in the confg

@CamKem
Copy link
Contributor

CamKem commented Feb 15, 2025

Confirm this fix myself; this PR Closes #55

CamKem added a commit to CamKem/solo that referenced this pull request Feb 15, 2025
@aarondfrancis
Copy link
Collaborator

Wonderful fix. Thank you! I wouldn't have guessed it was gonna be __set_state, nice sleuthing.

@aarondfrancis aarondfrancis merged commit 3b41443 into soloterm:main Feb 18, 2025
8 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.

3 participants