Skip to content

Conversation

@jivanf
Copy link
Contributor

@jivanf jivanf commented Jan 16, 2026

#108 ensured that there isn't an attempt to modify virtual properties during serialization. However, since this isn't done in wrapClosures() and mapPointers(), this fix doesn't handle the following cases:

  • The closure containing an object with virtual properties is bound to another object. This calls wrapClosures() which always updates properties.
  • At least one virtual property returns an array or an object. mapPointers() only updates properties when the value is an array or an object.

This PR uses the same virtual property check added to mapByReference() in #108. The method was made static because wrapClosures() is static.

@taylorotwell taylorotwell merged commit f94277c into laravel:2.x Jan 16, 2026
14 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.

2 participants