HI,
On Mon, Mar 17, 2014 at 3:22 PM, Leigh <[email protected]> wrote:
>
> On 17 March 2014 10:23, Andrey Andreev <[email protected]> wrote:
>>
>> Hi Yasuo,
>>
>> There's no SessionHandler::create_sid() or
>> SessionHandlerInterface::create_sid() documented (see your own link to
>> the docs) ... since when is this available?
>>
>> I'm not sure if exposing it is a good idea anyway, why is it necessary?
>>
>
>
> It was added in 5.5.1 - The PR was made 2 years ago by myself:
> https://github.com/php/php-src/pull/109
>
> It's not documented because I'm lazy, (it's one of those TODO items that has
> become permanent), but I personally use it. The underlying method on the
> session interface has been there for a long time (10 years might even be
> accurate), but for some unknown reason, it was not exposed to userland when
> all of the other methods were.
>
> It is necessary for custom session handler classes because without it calls
> to session_regenerate_id() do not inform the session handler about the
> change of session id. The presence of this method allows you to capture
> session id regeneration, and update files, databases, etc. as necessary, and
> also allows you to fully customise the actual session id token that is used.
> Custom prefixes, body content, encoding charset, etc.
I see ... that (and the PR discussion) answers all of my questions,
thanks. Btw, I could take the docs out of your TODO list, as long as I
can figure out of all repos, which one do I need to fork so I can push
documentation additions ... the web interface sucks.
With that said, +1 for changing it to SessionHandler::createSid().
Cheers,
Andrey.