Merge branch '380-remove-not-null-constraint-household-composition' into 'master'

Remove "not null" validation on HouseholdComposition properties

Closes #380

See merge request Chill-Projet/chill-bundles!818
This commit is contained in:
Julien Fastré 2025-04-17 09:03:15 +00:00
commit ad17313c61
2 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1,7 @@
kind: Fixed
body: |
Remove the "not null" validation constraint on recently added properties on HouseholdComposition
time: 2025-04-17T10:56:27.939628281+02:00
custom:
Issue: "380"
SchemaChange: No schema change

View File

@ -58,13 +58,11 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
private ?int $numberOfChildren = null;
#[Assert\NotNull]
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
#[Serializer\Groups(['docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
private ?int $numberOfDependents = null;
#[Assert\NotNull]
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
#[Serializer\Groups(['docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]