From 82e1d6b91777729c9f489200635dafa233d1edfb Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Wed, 28 Oct 2020 16:56:09 +0100 Subject: [PATCH] fix assertion deprecation (#2068) --- src/Entity/ColorTrait.php | 2 +- src/Entity/Invoice.php | 2 +- src/Entity/Role.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Entity/ColorTrait.php b/src/Entity/ColorTrait.php index b95e4fb2..1bf66d4c 100644 --- a/src/Entity/ColorTrait.php +++ b/src/Entity/ColorTrait.php @@ -28,7 +28,7 @@ trait ColorTrait * @Exporter\Expose(label="label.color") * * @ORM\Column(name="color", type="string", length=7, nullable=true) - * @Assert\Length(min=4, max=7) + * @Assert\Length(min=4, max=7, allowEmptyString=true) */ private $color = null; diff --git a/src/Entity/Invoice.php b/src/Entity/Invoice.php index 24fbd014..79b1b1ba 100644 --- a/src/Entity/Invoice.php +++ b/src/Entity/Invoice.php @@ -138,7 +138,7 @@ class Invoice * * @ORM\Column(name="invoice_filename", type="string", length=150, nullable=false) * @Assert\NotNull() - * @Assert\Length(min=1, max=150) + * @Assert\Length(min=1, max=150, allowEmptyString=false) */ private $invoiceFilename; diff --git a/src/Entity/Role.php b/src/Entity/Role.php index adcf85cf..73a88198 100644 --- a/src/Entity/Role.php +++ b/src/Entity/Role.php @@ -38,7 +38,7 @@ class Role * @ORM\Column(name="name", type="string", length=50, nullable=false) * @Assert\NotNull() * @Assert\NotBlank() - * @Assert\Length(allowEmptyString=false, min=5, max=50) + * @Assert\Length(min=5, max=50, allowEmptyString=false) */ private $name;