-
-
Notifications
You must be signed in to change notification settings - Fork 947
Type::isSmallerThanOrEqual does not care about the PHP Version #11732
Copy link
Copy link
Open
Labels
Description
Bug report
Since it might require a BC break, changing the signature to
public function isSmallerThanOrEqual(Type $otherType, PhpVersion $phpVersion): TrinaryLogic;
you might be interested about this (small ?) issue about releasing 2.0 @ondrejmirtes.
I assume the same issue exists for CompoundType::isGreaterThanOrEqual.
cc @staabm Since you worked a lot on looseComparison, you might be interested by this.
Code snippet that reproduces the problem
Expected output
I expect Comparison operation "<=" between 0 and '' is always true. for PHP 7.4- instead of always false.
Cf https://3v4l.org/qVgOX
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is an awesome tool, I love to use and love to try to improve (but I feel like finding bugs are way and way harder).
Reactions are currently unavailable