Closed Firehed closed 1 year ago
Yeah definitely looks like a problem: https://github.com/jbboehr/phpstan-laravel-validation/blob/1fe0f3b4a5bddb3ae4df7d59025cd181caa1142a/src/Validation/TypeResolver.php#L158
I'm testing against a dump from the laravel test suite but that only catches too-specific types, not the other way around :)
Hi - thanks for putting this together! It's helping me out a lot with typechecking Laravel validation results :)
I noticed that the following validation appears to be producing the wrong type:
Unless Laravel's
integer
validation is doing something really odd, it seems like the result of this should instead beint|numeric-string
, without thefloat
in the union.I'm currently using
dev-master 1fe0f3b
of this extension.