Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix GH-9186 @strict-properties can be bypassed using unserialization #9354
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 GH-9186 @strict-properties can be bypassed using unserialization #9354
Changes from all commits
6d66a7a
0869882
ebafb25
a8515c7
b1f1abc
8c8ff84
f1a6837
817adf5
d730db9
90bef0f
25863e1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__wakeup
is mostly only called for unserialization, not directly@deprecated
line to the PHPDoc comment does that, I believe__wakeup
should be changed to do nothing (and emit a deprecation notice), and be removed in the next major version. User code calling$fixedArray->__wakeup
directly and copying declared properties (not changing them) and moving+removing dynamic properties to the array (but only if the array size is 0) is unintuitive and not something you'd deliberately do. The deprecation notice will tell anything doing that that it will no longer work.get_object_properties{,_for}
has weirdness as a result of what__wakeup
does right now - thankfully, the impact of some of that will go away with the switch to__serialize
and the rest is out of scopeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also support the deprecation of
__wakeup()
, but it seems a bit late, just before RC1. Of course, it is possible that doing so is still the least worst option. To be honest, I definitely wouldn't remove the whole code of__wakeup
just yet, deprecating first seems a smoother upgrade path IMO.Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.