fix php 8.1 deprecations (#3648)

* show session maxlifetime in doctor
* rephrase compatibility in release notes
* bump version
This commit is contained in:
Kevin Papst
2022-11-24 13:12:18 +01:00
committed by GitHub
parent 2aa5eccc7c
commit 94a6b99c57
20 changed files with 125 additions and 57 deletions

View File

@@ -25,12 +25,20 @@ class DateTimeFormatValidator extends ConstraintValidator
throw new UnexpectedTypeException($constraint, __NAMESPACE__ . '\DateTimeFormat');
}
if ($value === null) {
return;
}
$valid = true;
try {
$test = new \DateTime($value);
} catch (\Exception $ex) {
if (!\is_string($value)) {
$valid = false;
} else {
try {
$test = new \DateTime($value);
} catch (\Exception $ex) {
$valid = false;
}
}
if (false === $valid) {