Skip to content

[#79521] Check __set_state structure #5462

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

Closed
wants to merge 1 commit into from
Closed

[#79521] Check __set_state structure #5462

wants to merge 1 commit into from

Conversation

carusogabriel
Copy link
Contributor

@carusogabriel carusogabriel commented Apr 26, 2020

Found while working on #4177. This fixes two problems:

Similar to #5441.

@carusogabriel carusogabriel changed the title Ensure declaration of __set_state modifiers Check __set_state structure Apr 26, 2020
@carusogabriel carusogabriel changed the title Check __set_state structure [#79521] Check __set_state structure Apr 26, 2020
@nikic
Copy link
Member

nikic commented Apr 27, 2020

Hm, I'm wondering if we should be checking max arg number on magic methods, e.g. there's https://bugs.php.net/bug.php?id=46225.

Maybe it makes sense to rewrite magic method validation in terms of validation against dummy signatures, which will then follow exact PHP signature validation semantics.

@carusogabriel
Copy link
Contributor Author

@nikic Thanks for sharing that feature request, indeed is something that we could change. I'll remove the check related to arguments and I'll come up with something regarding the dummy signatures validation

@carusogabriel carusogabriel requested a review from nikic April 27, 2020 14:30
@php-pulls php-pulls closed this in 34c460f Apr 28, 2020
@carusogabriel carusogabriel deleted the php8/set_state-static branch April 28, 2020 15:02
@carusogabriel carusogabriel added this to the PHP 8.0 milestone May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants