Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty type-hinting and nullable state #226

Closed
hildebro opened this issue Sep 6, 2023 · 1 comment
Closed

Faulty type-hinting and nullable state #226

hildebro opened this issue Sep 6, 2023 · 1 comment

Comments

@hildebro
Copy link

hildebro commented Sep 6, 2023

The set-list DOCTRINE_CODE_QUALITY changes this:

    #[ORM\Column(type: 'decimal', precision: 9, scale: 2)]
    protected $amount;

into this:

    #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DECIMAL, precision: 9, scale: 2)]
    protected ?string $amount = null;

The field nullable on ORM\Column is false by default. But the set-list seems to imply it to be true, adding an undesired ? and initializing the field with null.

@hildebro
Copy link
Author

hildebro commented Sep 6, 2023

sorry, just saw that this is a duplicate of #191

@hildebro hildebro closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant