Skip to content

Releases: PhpGt/Cookie

Cookie::__toString

17 Jul 20:13
Compare
Choose a tag to compare

A simple release, but one that includes a missing feature: the ability to pass Cookie objects into functions that typehint string parameters.

Also:

  • Faster unit test execution
  • No development dependencies (cleaner tree, faster install)

Array conversion and clearing of cookies

08 Apr 12:34
Compare
Choose a tag to compare

Some areas of code are not always under your control, and if an area of code expects to see the cookies in an associative array call the asArray method.

More importantly, it's now possible to clear all or specific cookies by using the clear() function, passing in any cookie names that you want to remove.

v1 release

18 Jan 23:40
Compare
Choose a tag to compare

The repository has been in use for many months now, but has not made a v1 release until now because of a tricky bug that only occurred every so often in the unit tests.

The bug was caused by using in_array without the strict type flag. This was only a bug in the unit tests, so no new functionality has been added or changed to mark the stable release.

Fully tested

18 Jan 17:21
Compare
Choose a tag to compare
Fully tested Pre-release
Pre-release

The final backwards-breaking change is that the path of a cookie is now always hard-coded to "/" - as setting a cookie per-directory is not recommended behaviour and can lead to confusing side effects.

There are a few integration tests to be made on this simple repository before it is released as v1.0.0, but until then there will be no backwards-breaking changes introduced.

Documentation update

19 Jul 08:50
aa735fa
Compare
Choose a tag to compare
Documentation update Pre-release
Pre-release
v0.1.1

Update CONTRIBUTING.md

CookieHandler complete

16 Jan 21:37
Compare
Choose a tag to compare
Pre-release

The CookieHandler class is what is used to interface with cookies, and behaves just like the $_COOKIE superglobal so it is easy to get used to.

  • ArrayAccess to get quick access to cookie values.
  • get, set, has, delete methods for OOP usage.

Cookie object implemented

16 Jan 19:33
Compare
Choose a tag to compare
Pre-release

The Cookie object is a very simple object that acts as a representation of a key value pair, but with the immutable object pattern to avoid other classes editing their value on-the-fly.

"The practice by which changes result in a new instance is termed immutability, and is a feature designed to ensure the integrity of a given value".

This is important with Cookies, because once they are set on the Request/Response, they object representation shouldn't be changed without being set again.