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

No more than 8 literals can be provided in a type #4925

Closed
johnbillion opened this issue Apr 30, 2021 · 3 comments
Closed

No more than 8 literals can be provided in a type #4925

johnbillion opened this issue Apr 30, 2021 · 3 comments

Comments

@johnbillion
Copy link
Contributor

Bug report

When specifying a literal union type, a maximum of 8 literals can be provided. If more than 8 are provided then PHPStan does not trigger an error if an invalid value is used.

The example below shows that a function parameter that's typed with 9 or more literals in its union type does not trigger an error.

Code snippet that reproduces the problem

https://phpstan.org/r/37b77142-9d28-4ecd-b268-e4aa33cb169d

@ondrejmirtes
Copy link
Member

Duplicate of #3555

@ondrejmirtes ondrejmirtes marked this as a duplicate of #3555 Apr 30, 2021
@github-actions
Copy link

github-actions bot commented Jun 1, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2021
@ondrejmirtes
Copy link
Member

I managed to solve this.

Look forward to the next release (0.12.95) :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants