Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73235 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61409 invoked from network); 17 Mar 2014 21:17:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2014 21:17:14 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.172 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.172 mail-lb0-f172.google.com Received: from [209.85.217.172] ([209.85.217.172:37274] helo=mail-lb0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/6F-17561-85667235 for ; Mon, 17 Mar 2014 16:17:12 -0500 Received: by mail-lb0-f172.google.com with SMTP id c11so4150268lbj.31 for ; Mon, 17 Mar 2014 14:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=97+5MtT7/GEbSWDmjdokwg3mRj/wruKFxk6Tt6uhuME=; b=AqKQIY6d7UH6wThNjh9S+LMjA5PwL2Jkx+C/uE/kbt/8gVyjYNkCYkC6KOCoglITYr 3/J8CVQxHhu3t5f14uGOA2dI6NEkIaOYAaRa4Dmy9NqR2JjOENnzaGz+N3R6gz25ZV3g RbIA/Fqkd3gU4aTJ0HuU3Lju4psbuBqJkhGbDV4gogsEZUPYZ1KnxJM2/U5Az1ugKACl gLxY8jX9EFs7dnELMlxX+HHVB4+PUA95cQVuYzdvN2j10xkgsIhn/A+1f/NiXTMmdXsz O+xfz4NzW0fBE/T4g5rq7puOyMLnI2JckX+ACVI/iIsB7KfXuleNBEHXn4/IbizLAP3E 8XJQ== X-Received: by 10.112.147.67 with SMTP id ti3mr17242838lbb.14.1395091029434; Mon, 17 Mar 2014 14:17:09 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Mon, 17 Mar 2014 14:16:29 -0700 (PDT) In-Reply-To: References: Date: Tue, 18 Mar 2014 06:16:29 +0900 X-Google-Sender-Auth: gzXaffPYssXuwyoCyOcL3lcrBlE Message-ID: To: Leigh Cc: Andrey Andreev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b3441c43d2bf104f4d3f1c1 Subject: Re: [PHP-DEV] Session: deprecating create_sid() method and add createSid()? From: yohgaki@ohgaki.net (Yasuo Ohgaki) --047d7b3441c43d2bf104f4d3f1c1 Content-Type: text/plain; charset=UTF-8 Hi Leligh, On Mon, Mar 17, 2014 at 10:22 PM, Leigh wrote: > On 17 March 2014 10:23, Andrey Andreev 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. Thank you for clarification. I didn't realize when it was implemented. Documentation at that time would be nice w/o session_create_id(). If it is added 5.5.1, it would be safer to rename. I think procedural session_create_sid() interface was added long time ago, but it's not important. As it is deprecated by documentation and I wouldn't change the name. User defined save handler documentation should be improved. I think many users are returning invalid value for read() especially. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --047d7b3441c43d2bf104f4d3f1c1--