Skip to content

Conversation

@paulbalandan
Copy link
Member

@paulbalandan paulbalandan commented Jan 30, 2021

Description
This introduces a new Cookie class and the CookieStore for holding a collection of cookies.

  • A CookieInterface defines the basic methods for all HTTP cookies.
  • A CloneableCookieInterface, which extends CookieInterface defines methods of an immutable HTTP cookie.
  • A Cookie implementing CloneableCookieInterface representing an immutable HTTP cookie object.
  • A CookieStore represents an immutable collection of Cookie objects.

Supersedes #4092 .
Replaces and closes #3983 .

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan force-pushed the alternative-cookie-implementation branch 3 times, most recently from 79693a2 to f3f84a9 Compare January 31, 2021 15:37
@paulbalandan paulbalandan changed the base branch from 4.1 to develop February 1, 2021 05:30
@paulbalandan paulbalandan changed the title [4.1] Abstraction for cookies and cookie collections Abstraction for cookies and cookie collections Feb 1, 2021
@paulbalandan paulbalandan force-pushed the alternative-cookie-implementation branch 2 times, most recently from f4c6347 to fc66a8f Compare February 1, 2021 05:57
@paulbalandan paulbalandan force-pushed the alternative-cookie-implementation branch from fc66a8f to 370aabf Compare February 1, 2021 07:20
@WinterSilence
Copy link
Contributor

you can rewrite my solution if don't want read manuals..

@paulbalandan
Copy link
Member Author

you can rewrite my solution if don't want read manuals..

Before posting this PR, I've read the php manual on this as well as the relevant RFCs. I've even consulted MDN for latest behavior of modern browsers for cookies. So I'd say this is researched and not just simply putting some code.

@paulbalandan paulbalandan force-pushed the alternative-cookie-implementation branch from 370aabf to f046c64 Compare February 7, 2021 15:00
@paulbalandan paulbalandan requested a review from michalsn February 8, 2021 07:38
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good job. I like how it looks - well thought out.

Not sure if this kind of change should target the PATCH version... but we don't really know what version the next release will have, so I guess it's okay.

@lonnieezell
Copy link
Member

This can be merged, right?

@paulbalandan
Copy link
Member Author

Thanks for the reviews. @lonnieezell , I just have some minor phpdoc revisions to do later this day and I'll merge this right after.

@paulbalandan paulbalandan force-pushed the alternative-cookie-implementation branch from f046c64 to 348af2e Compare February 12, 2021 15:48
@paulbalandan paulbalandan force-pushed the alternative-cookie-implementation branch from 348af2e to 6367766 Compare February 12, 2021 16:22
@paulbalandan paulbalandan merged commit 69038f6 into codeigniter4:develop Feb 12, 2021
@paulbalandan paulbalandan deleted the alternative-cookie-implementation branch February 12, 2021 16:46
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.

7 participants