Skip to content

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Sep 23, 2023

It broke because of the refcount==1 condition added in 6c5942f. Removing that condition would work, but remove an optimization. The test file starts with the outer object at RC1 so it isn't registered in var_hash, but during serialization it gets an additional reference so now we have a problem.

@nielsdos nielsdos linked an issue Sep 23, 2023 that may be closed by this pull request
@nielsdos nielsdos requested a review from dstogov September 24, 2023 17:17
@bukka
Copy link
Member

bukka commented Sep 8, 2025

@nielsdos Is there any reason (except possibly perf impact) why this wasn't merged? (sorry about notification mess up - commented first on the issue...)

@nielsdos
Copy link
Member Author

nielsdos commented Sep 8, 2025

@bukka because no one reviewed this final version of the pr and therefore did not get approval.
I don't think serialization hooks are so common that this will cause issues?
I can rebase this if you want me to pick this up again.

@nielsdos nielsdos changed the base branch from PHP-8.1 to PHP-8.3 September 8, 2025 16:57
@nielsdos nielsdos requested a review from bukka as a code owner September 8, 2025 16:57
@nielsdos
Copy link
Member Author

nielsdos commented Sep 8, 2025

Rebased on 8.3.

@nielsdos nielsdos closed this in f6f1748 Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloning an object breaks serialization recursion
3 participants