Hi Andrey,
On Wed, Mar 19, 2014 at 8:27 AM, Andrey Andreev <[email protected]> wrote:
> On Wed, Mar 19, 2014 at 1:04 AM, Yasuo Ohgaki <[email protected]> wrote:
> > Hi all,
> >
> > On Tue, Mar 18, 2014 at 7:58 PM, Andrey Andreev <[email protected]>
> 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
[email protected]