From ad27a0f03c2eff8e99467ccbcd419c3da2dc097e Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 31 Jul 2026 10:15:35 +0300 Subject: [PATCH] use native session dates --- backend/app/Auth/EloquentSessionRepository.php | 3 +-- backend/app/Auth/SessionModel.php | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/app/Auth/EloquentSessionRepository.php b/backend/app/Auth/EloquentSessionRepository.php index 5c038d4..fd2ad3a 100644 --- a/backend/app/Auth/EloquentSessionRepository.php +++ b/backend/app/Auth/EloquentSessionRepository.php @@ -3,7 +3,6 @@ namespace App\Auth; use App\User\UserRepository; -use Carbon\CarbonInterface; use DateTimeImmutable; use DateTimeZone; @@ -55,7 +54,7 @@ class EloquentSessionRepository implements SessionRepository SessionModel::where('token', $token)->delete(); } - private function toUtc(CarbonInterface $dateTime): DateTimeImmutable + private function toUtc(DateTimeImmutable $dateTime): DateTimeImmutable { return DateTimeImmutable::createFromInterface($dateTime) ->setTimezone(new DateTimeZone('UTC')); diff --git a/backend/app/Auth/SessionModel.php b/backend/app/Auth/SessionModel.php index 0b5092c..37b30cb 100644 --- a/backend/app/Auth/SessionModel.php +++ b/backend/app/Auth/SessionModel.php @@ -2,7 +2,7 @@ namespace App\Auth; -use Carbon\CarbonInterface; +use DateTimeImmutable; use Illuminate\Database\Eloquent\Attributes\Fillable; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; @@ -10,8 +10,8 @@ use Illuminate\Database\Eloquent\Model; /** * @property string $token * @property int $user_id - * @property CarbonInterface $created_at - * @property CarbonInterface $expires_at + * @property DateTimeImmutable $created_at + * @property DateTimeImmutable $expires_at * * @method static Builder|SessionModel newModelQuery() * @method static Builder|SessionModel newQuery()