Add options for cookie domain, secure, and httponly #7
Add options for cookie domain, secure, and httponly #7
Conversation
* Updated tests. Added assertions for new options. * Updated docs with new config options and manual instantiation args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great - I particularly appreciate the documentation updates!
I've noted a BC break in the constructor that needs to be addressed. Once updated, I can review and merge. Thanks, @marcguyer !
->withDomain($this->cookieDomain) | ||
->withPath($this->cookiePath) | ||
->withSecure($this->cookieSecure) | ||
->withHttpOnly($this->cookieHttpOnly); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question: will these calls be problematic if the values are null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only value that could be null is $this->cookieDomain
and SetCookie::withDomain
accepts a null
value. Both $this->cookieSecure
and $this->cookieHttpOnly
are boolean values. Both SetCookie::withSecure
and SetCookie::withHttpOnly
only accept boolean values. In all cases, calling these methods with the default values as arguments will not change behavior.
Thanks, @marcguyer! |
This patch provides the ability to set additional options for for the generated session
Set-Cookie
header, including:Changes include tests and documentation updates.