phpstan-doctrine
phpstan-doctrine copied to clipboard
Doctrine extensions for PHPStan
The following code: ```php /** * @var int */ #[ORM\Column(name: 'sorting_order', type: 'smallint', options: ['default' => 0])] public int $order = 0; ``` Reports: ``` Property Entity::$order type mapping mismatch:...
This PR demonstrates the bug described in #670
Doctrine DBAL always converts the database value to a PHP array, even when the field contains null. SimpleArrayType mapper converts the null value from DB to [an empty PHP array](https://github.com/doctrine/dbal/blob/4.2.x/src/Types/SimpleArrayType.php#L41)....