Replies: 1 comment 2 replies
-
Hi, PHPStan is correct here, Doctrine will inject string in your property. See the docs: https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello !
a simple question : how to "add" more integer types to phpstan ?
With a Doctrine 'bigint' field, i have an error message :
phpstan: Property App\Entity\MyEntity::$size type mapping mismatch: database can contain string but property expects int.
My field (not nullable) :
Doctrine Column reference : https://www.doctrine-project.org/projects/doctrine-orm/en/2.8/reference/annotations-reference.html#column
MySQL integer types reference : https://dev.mysql.com/doc/refman/8.0/en/integer-types.html
phpstan v0.12.80, phpstan-doctrine v0.12.32, phpstan-symfony v0.12.20, php 7.3
Thanks for your lights and help :)
Beta Was this translation helpful? Give feedback.
All reactions