On AsyncFileExists, checks on null value for the customization of the message

This commit is contained in:
Julien Fastré 2024-04-08 13:21:14 +02:00
parent 19ffef156b
commit 2b3f8948f8
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -21,8 +21,11 @@ final class AsyncFileExists extends Constraint
public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, $payload = null) public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, $payload = null)
{ {
parent::__construct($options ?? [], $groups, $payload); parent::__construct($options ?? [], $groups, $payload);
if (null !== $message) {
$this->message = $message; $this->message = $message;
} }
}
public function validatedBy() public function validatedBy()
{ {