Skip to content

RFC: new attribute #[NotSerializable]#12788

Open
MaxSem wants to merge 1 commit intophp:masterfrom
MaxSem:not_serializable
Open

RFC: new attribute #[NotSerializable]#12788
MaxSem wants to merge 1 commit intophp:masterfrom
MaxSem:not_serializable

Conversation

@MaxSem
Copy link
Copy Markdown
Contributor

@MaxSem MaxSem commented Nov 26, 2023

@MaxSem MaxSem force-pushed the not_serializable branch 2 times, most recently from c8e20b0 to e7f9365 Compare December 9, 2023 11:30
<?php

#[NotSerializable]
class C {}
Copy link
Copy Markdown
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()

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

Copy link
Copy Markdown
Contributor

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.

@MaxSem MaxSem requested a review from kocsismate as a code owner April 15, 2024 15:43
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.

4 participants