Skip to content

Cast JWT_TTL and related env values to int to avoid Carbon type errors#2296

Open
MustafaAMaklad wants to merge 1 commit into
tymondesigns:2.xfrom
MustafaAMaklad:fix/env-ttl-casting
Open

Cast JWT_TTL and related env values to int to avoid Carbon type errors#2296
MustafaAMaklad wants to merge 1 commit into
tymondesigns:2.xfrom
MustafaAMaklad:fix/env-ttl-casting

Conversation

@MustafaAMaklad
Copy link
Copy Markdown

PHP 8+ and recent Carbon versions are stricter about argument types.
Environment variables are always loaded as strings, which causes
Carbon::rawAddUnit() to throw a type error when JWT_TTL is used.

This PR explicitly casts numeric JWT config values to int, aligning with
Laravel config best practices and preventing runtime errors after upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant