-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
unsigned int recognized as type of int<-2147483648, 2147483647> #737
Comments
thanks for reporting. which database driver are you using? I guess the problem only happens for certain drivers (pdo, mysqli, doctrine/dbal,..?) |
In this project we are using Doctrine DBAL, cannot tell if it also happens with other drivers as well right now. |
dbal tests are here: https://github.com/staabm/phpstan-dba/blob/main/tests/default/data/doctrine-dbal.php I think it should be reproducible there |
Just thinking out loud, could it make sense to have a |
sounds like a good idea |
I have the following table structure (output from a
SHOW CREATE TABLE
statement in MySQL and omitted fields that do not matter for the issue):When I query that table in my code, then phpstan-dba will result in the following type:
Which I think is wrong, since the minimum value should be
0
, because theid
column is defined asunsigned
.I wanted to update the tests in a way that show that issue, but it took me too long... I am still willing to contribute a test and maybe even the fix, but I wanted to make sure I am not making any stupid mistakes 😅
The text was updated successfully, but these errors were encountered: