Open
Description
This is closely related to #198.
As @javiereguiluz comments, all setters - even for nullable fields - must allow null values to be passed in order for the validation to work. At the moment:
/**
* @ORM\Column(type="integer", nullable=false)
* @Assert\NotNull()
*/
private $adpointPublicationId;
generates:
public function setAdpointPublicationId(int $adpointPublicationId): self
{
$this->adpointPublicationId = $adpointPublicationId;
return $this;
}
so when null values passed through a form, we get the following error before validation is done.
Argument 1 passed to App\Entity\Product::setAdpointSectionGroupId() must be of the type integer, null given, called in .../backend/vendor/symfony/property-access/PropertyAccessor.php on line 527
Exception
Thanks, Hannes