Typed Property Defaults: problem with nullable properties #6760

Closed
opened 2026-01-22 15:38:07 +01:00 by admin · 2 comments
Owner

Originally created by @adpeyre on GitHub (Jun 16, 2021).

Hi,

Since the 2.9.2 release, my nullable php typed properties are not correctly taken into account by Doctrine.
For example, this attribute is not nullable in database:

 #[ORM\Column]
 public ?\DateTimeImmutable $canceledAt = null;

I needed to downgrade to 2.9.1.

Thx

Originally created by @adpeyre on GitHub (Jun 16, 2021). Hi, Since the 2.9.2 release, my nullable php typed properties are not correctly taken into account by Doctrine. For example, this attribute is not nullable in database: ``` php #[ORM\Column] public ?\DateTimeImmutable $canceledAt = null; ``` I needed to downgrade to 2.9.1. Thx
admin closed this issue 2026-01-22 15:38:07 +01:00
Author
Owner

@greg0ire commented on GitHub (Jun 16, 2021):

Hi! Have you read https://github.com/doctrine/orm/pull/8732 ?

@greg0ire commented on GitHub (Jun 16, 2021): Hi! Have you read https://github.com/doctrine/orm/pull/8732 ?
Author
Owner

@adpeyre commented on GitHub (Jun 16, 2021):

Thanks @greg0ire. I missed that. (I had deleted all my null constraints lol).
Merci :D

@adpeyre commented on GitHub (Jun 16, 2021): Thanks @greg0ire. I missed that. (I had deleted all my null constraints lol). Merci :D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6760