Skip to content

Comments

[12.x] Update forever cookie factory docblock to reflect 400-day duration#58744

Merged
taylorotwell merged 1 commit intolaravel:12.xfrom
jackbayliss:12.x-contract-doc-block
Feb 10, 2026
Merged

[12.x] Update forever cookie factory docblock to reflect 400-day duration#58744
taylorotwell merged 1 commit intolaravel:12.xfrom
jackbayliss:12.x-contract-doc-block

Conversation

@jackbayliss
Copy link
Contributor

@jackbayliss jackbayliss commented Feb 10, 2026

Was poking some cookie bits and noticed this.

The concrete implementation uses a 400 day duration (to align with Chromes 400 day max-age I believe) but the interface docblock still references "five years." This PR just keeps the contract aligned 🤷🏻

/**
* Create a cookie that lasts "forever" (400 days).
*
* @param string $name
* @param string $value
* @param string|null $path
* @param string|null $domain
* @param bool|null $secure
* @param bool $httpOnly
* @param bool $raw
* @param string|null $sameSite
* @return \Symfony\Component\HttpFoundation\Cookie
*/
public function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)

Targeted 12 as it's boring docbloc bits..

@taylorotwell taylorotwell merged commit 3072b54 into laravel:12.x Feb 10, 2026
72 checks passed
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.

2 participants