Union types#4838
Closed
nikic wants to merge 48 commits into
Closed
Conversation
Ocramius
approved these changes
Oct 22, 2019
Ocramius
left a comment
Contributor
There was a problem hiding this comment.
Only had time to go through the tests: huge work, nice!
a68c5eb to
471931e
Compare
azjezz
approved these changes
Oct 25, 2019
ammarfaizi2
approved these changes
Oct 31, 2019
Instead throw the generic invalid type message. Otherwise we may run into issues if a union type contains an invalid type, but also a valid one.
This is tricky...
Not sure if all of this is really worthwhile, but we can still drop it...
I'm going with a canonical type format here -- and I think we should move the rest towards this as well.
Class loading is no longer relevant here, so just test general behavior.
This reverts commit 476adfa.
Contributor
|
My only question in retrospect is why wait for PHP 8? |
|
@strongholdmedia because 7.4 went feature freez around a year ago 😄 ( https://externals.io/message/106249 ) |
Contributor
|
Sure, I do know that. :) |
|
Yes, there's no 7.5 :) |
Contributor
|
The uttermost shame is that I am long since subscribed to the internals list, but I couldn't get myself to wade through the nonsense of the attached .eml forest that is a PITA to view :/ Perhaps it is just time to switch to the regular format from the digest stuff. |
jrfnl
added a commit
to PHPCompatibility/PHPCompatibility
that referenced
this pull request
Dec 25, 2022
> Union Types > > Support for union types has been added. Detect whether a type is a union type and throw an error if PHP < 8 needs to be supported. Ref: * https://wiki.php.net/rfc/union_types_v2 * https://www.php.net/manual/en/migration80.new-features.php#migration80.new-features.core.union-types * https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.composite.union * php/php-src#4838 * php/php-src@999e32b
jrfnl
added a commit
to PHPCompatibility/PHPCompatibility
that referenced
this pull request
Dec 25, 2022
> Union Types > > Support for union types has been added. Detect whether a type is a union type and throw an error if PHP < 8 needs to be supported. Ref: * https://wiki.php.net/rfc/union_types_v2 * https://www.php.net/manual/en/migration80.new-features.php#migration80.new-features.core.union-types * https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.composite.union * php/php-src#4838 * php/php-src@999e32b
jrfnl
added a commit
to PHPCompatibility/PHPCompatibility
that referenced
this pull request
Dec 25, 2022
> Union Types > > Support for union types has been added. Detect whether a type is a union type and throw an error if PHP < 8 needs to be supported. Ref: * https://wiki.php.net/rfc/union_types_v2 * https://www.php.net/manual/en/migration80.new-features.php#migration80.new-features.core.union-types * https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.composite.union * php/php-src#4838 * php/php-src@999e32b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation for union types RFC.