Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81072 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39996 invoked from network); 24 Jan 2015 09:34:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2015 09:34:45 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.50 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.50 mail-oi0-f50.google.com Received: from [209.85.218.50] ([209.85.218.50:62868] helo=mail-oi0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/73-10645-53763C45 for ; Sat, 24 Jan 2015 04:34:45 -0500 Received: by mail-oi0-f50.google.com with SMTP id h136so1210932oig.9 for ; Sat, 24 Jan 2015 01:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TsMEgkwgJaG59/gtyj2R/3Ow3ruEluUCccl/EzxWkmY=; b=H7sVj/XiGZNLa1r8xeZu5YqCBt+QK2YcJhAlHCZw6A9SR+wD8BuuXEY3ssfFRuDQCL RnlqTTYTCvyK6Q47FcAdRtMGT2B/RR92bGJgJdn4aKhB24D7AtRVCzV3fQ2+IKuPZ11G u7J8MhufPdidRnu9hDGmXGG6j2gkh9JkMLLDk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TsMEgkwgJaG59/gtyj2R/3Ow3ruEluUCccl/EzxWkmY=; b=kzGNqSvDbSasNyUMTzSpyTIq5ITaqsgEYi1HnUe9fbuAZd61sNjUzF9HBqAIqUHNoh 8+207Te2udCxsfi+PLQ9an5kNk9N+9sv1Hbu5nE1C353Rdr5FsfoDH6239virR9BF0KA IgwSR/EeTLH++UeZhZ5IhgqdBJiSZRSTYlI30wmJvEOS5bvAQKNMnDLbQ3W02NjILfQm zkUyRz/iiVWSetRioc4RjV0Ze5eAobA4GOt5ObW4tBKv3ToflTg9LjSRYhvZETxLE829 RW+/5G9VuT1e1UFc0aeL0GXr/tXug8/ajCy2+ce/v9OT2QOQgr6iqcnc5dDL3VH/Vijt sF+g== X-Gm-Message-State: ALoCoQmfdj0Yl5sPX4Qu+KcGCBlO/0cigMpPm0FgKT4/Oc3IFVOXwHsRz7oIg5pW7tlDcjze+VKY MIME-Version: 1.0 X-Received: by 10.202.169.208 with SMTP id s199mr2261093oie.21.1422092082568; Sat, 24 Jan 2015 01:34:42 -0800 (PST) Received: by 10.202.214.205 with HTTP; Sat, 24 Jan 2015 01:34:42 -0800 (PST) In-Reply-To: References: <54C1D562.1080402@gmail.com> <54C1EE77.7040000@gmail.com> <54C2DE03.6090708@gmail.com> Date: Sat, 24 Jan 2015 11:34:42 +0200 Message-ID: To: Yasuo Ohgaki Cc: Stanislav Malyshev , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Removing base class from session handler From: narf@devilix.net (Andrey Andreev) Hi, On Sat, Jan 24, 2015 at 2:24 AM, Yasuo Ohgaki wrote: > Hi Stas, > > On Sat, Jan 24, 2015 at 8:49 AM, Stanislav Malyshev > wrote: > >> > This is the only reasonable use I know. I would to write user >> > serializer(read/writer) >> > handler for it. >> >> So we went from no reasonable use to one reasonable use, documented at >> the manual. I think it is also reasonable to suppose there are more uses >> for it. >> > > This is because session module lacks user defined serializer. Save handler > handles session data storage. Serialize handler handles how data is > converted/represented. IMHO. > That's not the only use case. Some time ago I proposed a session.match_ip feature and argued that if I wanted to implement it in userland code, I'd have to implement the *whole* session handler from scratch. An example using the SessionHandler class proved me wrong in that regard. Surely, people are using it for other stuff as well and it's not about the serializer. > I would like to make SessionHandler deprecated, encourage user serialize > handler for new PHP because it's more efficient and clean. Do you agree? > How can it possibly be more efficient and clean if you have to re-implement everything with user-level code? > Let's keep SessionHandler class. However, > PHP_FUNCTION(session_set_save_handler) > should be cleaned up to verify implemented/extended interface/class. It's > BC. > Do you have opinion for this? php > session_set_save_handler(new stdclass); PHP Warning: session_set_save_handler() expects parameter 1 to be SessionHandlerInterface, object given in php shell code on line 1 Cheers, Andrey.