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

@@ -11,11 +11,7 @@ namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraints\Regex;
/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*/
class Duration extends Regex
final class Duration extends Regex
{
public function __construct($options = null)
{
@@ -24,7 +20,7 @@ class Duration extends Regex
// negative times -? are allowed, because plugins could allow negative times
'-?[0-9]{1,}',
'-?[0-9]{1,}[,.]{1}[0-9]{1,}',
// ASP.NET style time spans - https://momentjs.com/docs/#/durations/
// ISO style time spans like 01:37
'-?[0-9]{1,}:[0-9]{1,}:[0-9]{1,}',
'-?[0-9]{1,}:[0-9]{1,}',
// https://en.wikipedia.org/wiki/ISO_8601#Time_intervals