UnionOfRAD/lithium — pull request #819 by thechriswalker (2013-02-08 21:26:52+00:00)
Title: Allowing Session id to be set manually (squash of https://github.com/UnionOfRAD/lithium/pull/818)

Updated the Session adaptable to pass through an optional
session_id parameter in the `::key` method, to set the
session id, rather than only allowing getting of the id.
The PHP adapter supported this, but the functionality was
masked by the Session adaptable not passing the id on.

This uncovered a bug in the PHP adaptable in the `::isStarted`
method which would false-positive if `session_id($non_empty)`
had been called beforehand. Also, the `::enabled()` method
was checking whether a session had been started, and not whether
php session functionality was enabled. Both of these have been
fixed and the test updated.

NB session started detection is vastly superior in PHP5.4 due
to the presence of the `session_status()` function.