Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73265 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33305 invoked from network); 18 Mar 2014 10:41:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2014 10:41:47 -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.213.49 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.213.49 mail-yh0-f49.google.com Received: from [209.85.213.49] ([209.85.213.49:39375] helo=mail-yh0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/B1-23742-AE228235 for ; Tue, 18 Mar 2014 05:41:46 -0500 Received: by mail-yh0-f49.google.com with SMTP id z6so6585363yhz.8 for ; Tue, 18 Mar 2014 03:41:43 -0700 (PDT) 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=hillQwfycYj1prUaeUpq8xMa0PPyP5Q80xb8nGXOuw0=; b=rdVhBpRAE3GjvIOOGg5WW9QVs5UUG5+OUgpb3EqvK0zmUjVOG+/7zFj2fOWh/R+IHO TgkGIH1HneS++kM+3mKvz3nbhHcUUVwL0jcpMiynYmUy9y8HcomF1iYDVMdkbC/GcUkY IUPrOibvuNX51alLxY0R1IWlhNE+J3zynypOQ= 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=hillQwfycYj1prUaeUpq8xMa0PPyP5Q80xb8nGXOuw0=; b=XHprwy3V9VxlCK1GYep+IqfM7aOdn3Q+z+pC4jwrg1PwVHYGjulhNxPuT7gYa5xy9b ed4mJD2ccsi7q7ibukaqWKTIuRR3fnGcddOg2oE4kIy6lz7MW8k3pHi8w6TdkCJY4SQP 9K1X3XWdsesPpVJtfhj4NkeJKXmZqVht9w3pxAVywlyOTxR+YVdq1Z5Hfs2u6IP+ZC6x xFfU6jQGHQYXBxANjaCoAxGvmWH5T5t04toCCIVb4YcT0jMXiOqqasMvD/ZImdq1o33K ZW9GNpUcLUK85b5hXhy8fUCohCZuZNcovjQUiA55V0E/QKGhcOJg8Rjsqp7TcSxzAGtI sxSQ== X-Gm-Message-State: ALoCoQm+57p18phvaZvvZGpVBOySqvUfV08nS6BFalc+DHuQH0gGpchhWA8IShZYbW0CAYaW5mui MIME-Version: 1.0 X-Received: by 10.236.116.131 with SMTP id g3mr562153yhh.110.1395139303826; Tue, 18 Mar 2014 03:41:43 -0700 (PDT) Received: by 10.170.188.139 with HTTP; Tue, 18 Mar 2014 03:41:43 -0700 (PDT) In-Reply-To: <5327F947.5020308@sugarcrm.com> References: <53277BE2.8020203@sugarcrm.com> <5327F947.5020308@sugarcrm.com> Date: Tue, 18 Mar 2014 12:41:43 +0200 Message-ID: To: Stas Malyshev Cc: Yasuo Ohgaki , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: Session: deprecating create_sid() method and add createSid()? From: narf@devilix.net (Andrey Andreev) Hey, On Tue, Mar 18, 2014 at 9:44 AM, Stas Malyshev wrote: > Hi! > >> If user uses undocumented interface (SessionIdInterface) they would have to >> implement both createSid() and create_sid(). Alternatively, we may introduce >> temporary interface for create_sid(). Or keep it undocumented and rename it >> in 5.6 only. > > Doing to all this length for what? To rename a function? Looks hardly > worth it. > >> Fortunately, current manual >> http://jp2.php.net/manual/en/function.session-set-save-handler.php >> is incomplete. It does not mention create_sid() and it's interface. It >> does not >> use interface for detailed version of example, too. > > It doesn't matter - it's there for 10 releases, so it's part of the API. > >> What is your opinion? > > My opinion it would be the best if we could support both and deprecate > create_sid in 5.6, but if it's hard to do cleanly, then leave it alone. I completely agree, and I think we're overthinking the possible solution, so here's what I'm proposing: Add SessionHandler::createId() to 5.5.next, when a userland session handler is in use, it should look for createId() first, create_sid() second and fallback to the internal implementation, whatever it is. parent::create_sid() should call SessionHandler::createId() (this is the dirty hack). Deprecate 'create_sid()' usage in 5.6. Multiple arguments usage of session_set_save_handler() is not affected, it only cares that you pass callables to it. Btw, this usage should probably be deprecated as well, but that's the subject of a separate discussion. Cheers, Andrey.