Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaxSem
Copy link
Contributor

@MaxSem MaxSem commented Nov 26, 2023

<?php

#[NotSerializable]
class C {}
Copy link
Member

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()

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?

Copy link
Member

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.

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.

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.

None yet

4 participants