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

Support arguments on virtual magic methods #521

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

ciaranmcnulty
Copy link
Member

Previously we didn't generate any arguments at all when looking at @method annotations. This was ok in the majority of cases because there was no contract that could apply to them (e.g. no interface can force a @method annotation)

Since PHP 8.0, certain magic methods now have their signatures enforced (https://wiki.php.net/rfc/magic-methods-signature)

We still don't need to generate types, but the number of arguments now needs to be correct.

Fixes #520

Previously we didn't generate any arguments at all when looking at @method annotations. This was ok in the majority of cases because there was no contract that could apply to them (e.g. no interface can force a @method annotation)

Since PHP 8.0, certain magic methods now have their signatures enforced (https://wiki.php.net/rfc/magic-methods-signature)

We still don't need to generate types, but the number of arguments now needs to be correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mocking Class / Interface with @method __unserialize ( array $data ) doc block throws fatal error in PHP8
1 participant