Skip to content

feat: update CookieInterface::EXPIRES_FORMAT to use date format per RFC 7231 #9563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 4.7
Choose a base branch
from

Conversation

paulbalandan
Copy link
Member

Description
When I first made this Cookie component, the MDN states that the date format is D, d-M-Y H:i:s T (RFC 850). Now, it seems this format is obsolete and recommends using RFC 5322 format (D, d M Y H:i:s \G\M\T - without dashes`). This PR updates the date format to that.

This change will not be breaking as per RFC 7231 section 7.1.1.1. Although RFC 850 is obsolete, it SHOULD still be accepted. Since we're moving from obsolete to recommended, I think we should not have any problems.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan added the enhancement PRs that improve existing functionalities label May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.7 enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants