feat: normalize email addresses to lowercase on write

This commit is contained in:
2026-09-21 12:20:55 +02:00
parent d6327f033e
commit af46c57bd1
7 changed files with 102 additions and 4 deletions
+3 -1
View File
@@ -39,7 +39,9 @@ class Communication
public function setEmail(?string $email): static
{
$this->email = $email;
// BusPro compares addresses case-insensitively; normalize on the way in so the DTO
// carries the same shape the entities store.
$this->email = null === $email ? null : mb_strtolower(trim($email));
return $this;
}