Private
Public Access
1
0

chg: dev: refactor all forms to have Symfony Form Types & Validation Constrainsts - & implement Google ReCapthca v3 #4

This commit is contained in:
2026-04-12 08:49:47 +02:00
parent e2b227ed7a
commit acbe9c7f63
21 changed files with 1253 additions and 351 deletions

View File

@@ -18,9 +18,9 @@ use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Table;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Class User
@@ -34,6 +34,8 @@ use Symfony\Component\Validator\Constraints as Assert;
*/
#[Table(name: 'app_user')]
#[Entity(repositoryClass: UserRepository::class)]
#[UniqueEntity(fields: ['username'], message: 'This username is already taken.')]
#[UniqueEntity(fields: ['email'], message: 'This email address is already registered.')]
class User implements UserInterface, PasswordAuthenticatedUserInterface
{
#[Id, GeneratedValue, Column]
@@ -82,7 +84,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
public function getUserIdentifier(): string
{
return (string) $this->username;
return (string)$this->username;
}
public function getRoles(): array