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
RFC: new attribute #[NotSerializable] #12788
base: master
Are you sure you want to change the base?
Conversation
ca94772
to
70177cb
Compare
70177cb
to
11c1b72
Compare
c8e20b0
to
e7f9365
Compare
e7f9365
to
de88b97
Compare
<?php | ||
|
||
#[NotSerializable] | ||
class C {} |
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.
There will need to be tests about extending a NonSerializable class, which also needs to determine if this works or not if the child class implements __serialize()
/__unserialize()
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.
Maybe it's better to make it final? Why would anyone extend this attribute class?
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.
The attribute class is final
. This is about classes that have the attribute applied.
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.
Oops, sorry, my bad. Great.
de88b97
to
732b522
Compare
https://wiki.php.net/rfc/not_serializable