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.