Skip to content

[5.x] Corrects issue serializing/deserializing "resolvingValues" when using Eloquent driver - #11888

Closed
JohnathonKoster wants to merge 1 commit into
statamic:5.xfrom
JohnathonKoster:bugfix/resolving-values-sleep
Closed

[5.x] Corrects issue serializing/deserializing "resolvingValues" when using Eloquent driver#11888
JohnathonKoster wants to merge 1 commit into
statamic:5.xfrom
JohnathonKoster:bugfix/resolving-values-sleep

Conversation

@JohnathonKoster

Copy link
Copy Markdown
Contributor

This PR fixes#11887

When deserializing/serializing an entry instance to a class that extends file entry, such as the Eloquent driver's entry instance, we will run into an issue when attempting to repopulate the $resolvingValues variable.

This PR addresses it in two ways:

  • Adjusts the visibility of $resolvingValues from private to protected, so any other classes that may use the HasOrigin trait do not run into issues
  • Adjusted the base Entry class's __sleep method to exclude the resolvingValues value

@JohnathonKosterJohnathonKoster changed the title [5.x] Corrects issue serializing/deserializing "resolvingValues"[5.x] Corrects issue serializing/deserializing "resolvingValues" when using Eloquent driverJun 22, 2025
@jasonvarga

Copy link
Copy Markdown
Member

Not necessary since #11894

Sign up for freeto 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.

resolvingValues returned as member variable from __sleep() but does not exist

2 participants

@JohnathonKoster@jasonvarga