Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -9,14 +9,10 @@
namespace App\Validator\Constraints;
use Doctrine\Common\Annotations\Annotation\Target;
use Symfony\Component\Validator\Constraint;
/**
* @Annotation
* @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})
*/
class User extends Constraint
#[\Attribute(\Attribute::TARGET_CLASS)]
final class User extends Constraint
{
public const USER_EXISTING_EMAIL = 'kimai-user-00';
public const USER_EXISTING_NAME = 'kimai-user-01';
@@ -30,9 +26,9 @@ class User extends Constraint
self::USER_EXISTING_NAME_AS_EMAIL => 'An equal email is already used.',
];
public $message = 'The user has invalid settings.';
public string $message = 'The user has invalid settings.';
public function getTargets()
public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}