Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73280 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15044 invoked from network); 18 Mar 2014 23:51:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2014 23:51:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:45348] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/17-16983-BFBD8235 for ; Tue, 18 Mar 2014 18:51:24 -0500 Received: by mail-lb0-f170.google.com with SMTP id s7so5397929lbd.29 for ; Tue, 18 Mar 2014 16:51:20 -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=1VFjpHwd/Y+t+FQLDu9Cv7gqOeIMjdfOmXjCk5DmHOI=; b=nFhaWsoG8MCsXEXRC9zZJ+C2EeIVtB9JBLMFAZM0nABvfLShwVQMGP3XpVXRc/5PIh YkWZGTeZQ9jRHbMC5JDSZPcLAx5vF3o1m7MM64wIEWrEwXTVP+B0vcl/bBCRUYmvdWMc 8+eH+vbNePytyyicurMbKz9fueLYXsAqb8byewXiJf4zc703ihnJi8UMcPdHXC9n2md6 1oJ2Z2F5nf2DqQFS/O4il8d+AmnAXn1w//6aXjXyguvMFKUhacrpgxBjCjvOofiE3abZ l4YXonOxxGKHHm2pySXsXgbj9Wbl9Illints3y6PY9k9EJFmpW5W5KOJF6ollOORAnQq ffyg== X-Received: by 10.112.1.233 with SMTP id 9mr21790051lbp.29.1395186680559; Tue, 18 Mar 2014 16:51:20 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Tue, 18 Mar 2014 16:50:40 -0700 (PDT) In-Reply-To: References: <5324FE40.1070704@sugarcrm.com> <532603A0.8060802@sugarcrm.com> <5327DD6E.6030402@sugarcrm.com> Date: Wed, 19 Mar 2014 08:50:40 +0900 X-Google-Sender-Auth: sssLljPUAlKo80caAYvANKNL8S4 Message-ID: To: Andrey Andreev Cc: Stas Malyshev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=14dae94edbd37d7e2a04f4ea3667 Subject: Re: [PHP-DEV] [RFC] Revert/extend/postpone original RFC about read_only, lazy_write sessions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --14dae94edbd37d7e2a04f4ea3667 Content-Type: text/plain; charset=UTF-8 Hi Andrey, On Wed, Mar 19, 2014 at 8:27 AM, Andrey Andreev wrote: > On Wed, Mar 19, 2014 at 1:04 AM, Yasuo Ohgaki wrote: > > Hi all, > > > > On Tue, Mar 18, 2014 at 7:58 PM, Andrey Andreev > wrote: > >> > >> Exacly why I wrote an RFC, except Yasuo already explained that current > >> workflows (speaking of userland handlers) are not affected and BC is > >> maintaned. > > > > > > I found issue with object based save handlers, but it was solved without > any > > BC. > > > > I also added createSid() method support. If both create_sid() and > > createSid() exists, > > createSid() is used. > > I thought this was currently in discussion, and in a separate thread? > > >> > How about making it a INI option? It makes session_start() option > >> > handling > >> > code > >> > a little simpler. It's not mandatory, though. > >> > >> +1 from me, if it is to be kept as an option. > > > > > > I'm about to modify patch to make it INI. No objections for this? > > Well, I said 'if' we keep it as an option at all. I'd rather update > the RFC to propose it as non-optional behavior since there are no > downsides from it, as I understand. > How should we handle this? It was session_start() option e.g. session_start(['lazy_write'=>true]); We are proposing make it INI option. Since session_start() accepts all INI options, so it can work as session_start(['lazy_write'=>true]); with INI. Anyone? > > >> > I think we are better to have another SessionHandler object that > support > >> > new > >> > APIs. > >> > We can handle create_sid() method rename with new object also. We may > >> > keep > >> > current implementation undocumented and may document it new one > >> > (createSid()) only. > >> > I will name it "SessionUpdateTimestampHandler". If anyone has > >> > suggestions, > >> > I would appreciate it. > >> > >> I object, although it should've been called SessionFilesHandler in the > >> first place, that way we could also have SessionMemcacheHandler, > >> SessionWhateverHandler - way nicer than it currently is, but again - > >> not the point of this discussion. > > > > > > I removed new object. It's not needed anymore, since I prevented bogus > > methods > > registration. > > Bogus methods? I wrote this RFC because it was completely unclear how > certain situations would be handled ... now this is also unclear. :) > I sent you a private e-mail earlier today, perhaps you could explain > me that in a reply to it so that we don't spam the list. It works as it is now. Please refer to code for details. https://github.com/php/php-src/pull/628/ It's mostly done. Anyway, object based save handler registers "previous save handler" function as base methods. It may call bogus method for user handler. - Previous save handler may not have new API - Calling base class method is invalid. i.e. Overriding open() etc. I made new API optional completely. Therefore, current save handler works as it is now and users may define new API if they want. Existing code (5.5 and less) has many protections against bogus method calls, too. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --14dae94edbd37d7e2a04f4ea3667--