phpstan-doctrine
phpstan-doctrine copied to clipboard
Invalid mapping type to property type check for binary mapping since DBAL v.4
Since DBAL v.4 binary mapping converts DB value to PHP string instead of resource. But PHPStan check produces an error in this case:
Property Entity\Foo::$bar type mapping
mismatch: database can contain resource|null but property expects
string|null.
What code reports this error?
@ondrejmirtes I've added PR that demonstrates the issue. If you agree, I can try to fix it by changing \PHPStan\Type\Doctrine\Descriptors\BinaryType::getWritableToPropertyType.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.