chore: replace DateTime by DateTimeImmutable

This commit is contained in:
Maël Gangloff
2024-12-21 21:29:31 +01:00
parent 817da2a652
commit 75c870490f
2 changed files with 4 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ class OvhProvider extends AbstractProvider
try {
$res = $conn->get('/auth/currentCredential');
if (null !== $res['expiration'] && new \DateTime($res['expiration']) < new \DateTime()) {
if (null !== $res['expiration'] && new \DateTimeImmutable($res['expiration']) < new \DateTimeImmutable()) {
throw new BadRequestHttpException('These credentials have expired');
}