. */ declare(strict_types=1); namespace App\Validator\Constraints; use Symfony\Component\Validator\Constraint; /** * Datetime interfaces properties with this constraint are limited to the year 2038 on 32-bit systems, to prevent a * Year 2038 bug during rendering. * * Current PHP versions can not format dates after 2038 on 32-bit systems and throw an exception. * (See https://github.com/Part-DB/Part-DB-server/discussions/548). * * This constraint does not fix that problem, but can prevent users from entering such invalid dates. */ #[\Attribute(\Attribute::TARGET_PROPERTY)] class Year2038BugWorkaround extends Constraint { public string $message = 'validator.year_2038_bug_on_32bit'; }