Skip to content

Added Scalar Pseudo-type #2987

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 3 commits into from
Closed

Added Scalar Pseudo-type #2987

wants to merge 3 commits into from

Conversation

Fleshgrinder
Copy link
Contributor

@Fleshgrinder Fleshgrinder commented Dec 24, 2017

This adds support for the scalar pseudo-type with parameter type contravariance and return type covariance to PHP. Please refer to the included tests to see what that means for you as a PHP developer.

Objects with a magic __toString method are accepted for scalar constrainted types as well if strict mode is not enabled.

Overhauled tests and removed redundant test cases.
@morrisonlevi
Copy link
Contributor

This adds support for the scalar pseudo-type with parameter type covariance and return type contravariance to PHP.

Didn't check the commits but that is backwards; covariant return types and contravariant parameter types is what is desired.

@Fleshgrinder
Copy link
Contributor Author

Fleshgrinder commented Dec 25, 2017

@morrisonlevi I only mixed the words here in the PR description, the tests use the proper wording and I'll double check the RFC right away:

PS: RFC also has it right, limited confusion here; thanks for the heads up. 😉

@krakjoe krakjoe added the RFC label Dec 26, 2017
@Girgias
Copy link
Member

Girgias commented Mar 1, 2019

Any update on this or has this been abandoned?

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.

4 participants