rectorphp/rector-doctrine

NullabilityColumnPropertyTypeResolver default false instead of true?

Closed this issue · 2 comments

I ma not sure if I understand it correctly.

But in this function, there should be default false, not true?

private function isNullableColumn(PhpDocInfo $phpDocInfo): bool

By default ORM\Column is nullable=false. If I don't have nullable neiehter in the attribute nor in phpdoc, it souhldn't be nullable for property. Am I missing something?

Example here also show ignoring nullable:false in the attribute, but it can be due to others refactoring rules.
image

Hi, it could be the case, as nullable=false is removing null and makes English double-negative hard :)

Could you send a PR with your proposal so we see how it changes tests fixtures?