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

Fix str_contains() never returns 0 on OnlyRuleResolver #6546

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

samsonasik
Copy link
Member

PHPStan somehow detect str_contains() as union

 0/1 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
PHPStan\Type\UnionType #22767
   types: array (2)
   |  0 => PHPStan\Type\IntegerRangeType #20331
   |  |  min: 0
   |  |  max: null
   |  1 => PHPStan\Type\Constant\ConstantBooleanType #22757
   |  |  value: false
   normalized: true
   sortedTypes: true
   cachedDescriptions: array (1)
   |  4 => 'int<0, max>|false'

Ref #6545 (review)

@samsonasik samsonasik enabled auto-merge (squash) December 11, 2024 11:39
@samsonasik samsonasik merged commit 13fc72a into main Dec 11, 2024
41 checks passed
@samsonasik samsonasik deleted the fix-str-contains-never-0 branch December 11, 2024 11:39
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