Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add tests to check ZPP handles intersection types for internal functions #9100

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

Open
Girgias wants to merge 2 commits into php:master
base: master
Choose a base branch
Loading
from Girgias:zpp-intersection-arg-return

Conversation

Copy link
Member

@Girgias Girgias commented Jul 22, 2022

No description provided.

ZEND_ARG_INFO(0, param)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_zend_intersection_type, 0, 1, Traversable|Countable, 0)
Copy link
Member

@kocsismate kocsismate Jul 26, 2022
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you plan to add support for intersection types in the arginfo? Right now, the return type seems a bit inaccurate (?).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't actually check the output of the arginfo >_> so yeah that would need fixing.

Not too sure how to add support, but I wanted to add a test to make sure stuff "works" which it seems although it's inacurate. Let me get back to this, and thanks for catching this :)

kocsismate reacted with thumbs up emoji
Copy link
Member Author

Girgias commented Jul 28, 2022
edited
Loading

(削除) I'm not sure if I need to do anything specific in the arg info to support intersection types actually. As I can't seem to find usages which use the type directly (削除ここまで)

Need to amend zend_verify_internal_arg_types()

Copy link
Member Author

Girgias commented Jul 28, 2022

Just to be sure, Arg Info doesn't actually support multiple class unions either? Or does it?

Copy link
Member

Just to be sure, Arg Info doesn't actually support multiple class unions either? Or does it?

Yeah, it is missing unfortunately :S I may be able to work on it though, if you do not want to

ju1ius reacted with eyes emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@kocsismate kocsismate kocsismate left review comments

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /