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

Do not typehint DNF union types #1585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Do not typehint DNF union types #1585

wants to merge 1 commit into from

Conversation

scyzoryck
Copy link
Collaborator

Q A
Bug fix? yes
New feature? no
Doc updated no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #1584
License MIT

Tests coverage based on: https://wiki.php.net/rfc/dnf_types

@goetas I need your opinion on that:

  1. Current implementation skips any cases of Disjunctive Normal Form Types.
  2. Alternative solution would be to skip only Intersection types, so (A&B)|D could be resolved into D, when (A&B)|C|D into union<C,D>

Looking at the use cases like ArrayCollections from Doctrine I guess second option might be more intuitive for users, when first safer as it brings back behavior from prev lib versions. 🤔

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.

1 participant