Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98410 invoked from network); 23 Jan 2015 23:49:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2015 23:49:28 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.182 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.182 mail-pd0-f182.google.com Received: from [209.85.192.182] ([209.85.192.182:36019] helo=mail-pd0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/D0-28190-70ED2C45 for ; Fri, 23 Jan 2015 18:49:28 -0500 Received: by mail-pd0-f182.google.com with SMTP id z10so370946pdj.13 for ; Fri, 23 Jan 2015 15:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=+nhnnX2F4NAeeKcikxa2GyVOBnutBhzVfGTU8KT0rjA=; b=W8vxlovdtrM8tVzajirGJMeIC2Xj2RKL9P/KAuqhMbDXf9qjFL6bis/2LEku5Vk4NL LJ50gfQ0LvbRZ29MOaePfIIZNbmGCtZttyXt5RdI+1iAwIV7QCU7MTmIbOnuWudG+P6/ ReqgJuikY2Slv8eSL3L//eN0MAwUFdYALlwNgmXImzRaeaoznHDqvpibKOlrN46ic5KQ +i/WUWzmwVF1tKgDmbMqUMxzrYaGiDArHyOzmv8xbVAIF7B7ys0+TGCDxRLZ4wEAQgwH eHtLcAb+XjHu3ZVzlXBv85vRcKt/1djBIxxFC6w9hrDSC4+Yr3uxFMyXOclSSskGSRLI j5cA== X-Received: by 10.70.95.133 with SMTP id dk5mr15291771pdb.98.1422056964577; Fri, 23 Jan 2015 15:49:24 -0800 (PST) Received: from stas-air.corp.wikimedia.org (tan1.corp.wikimedia.org. [198.73.209.1]) by mx.google.com with ESMTPSA id xv4sm3025952pab.13.2015.01.23.15.49.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 15:49:24 -0800 (PST) Message-ID: <54C2DE03.6090708@gmail.com> Date: Fri, 23 Jan 2015 15:49:23 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Yasuo Ohgaki CC: "internals@lists.php.net" References: <54C1D562.1080402@gmail.com> <54C1EE77.7040000@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Removing base class from session handler From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > 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. > My point is SessionHandler class is (almost) useless as a CLASS. It I think we established it is not useless. It may not be useful for you, but may be useful for other people. Creating a large BC break for a reason that something is not useable for someone is not a good idea, I think. I do not see any benefit such action would produce. > Goal is removing abused class usage.(cleanup) e.g. Refer to The action should not be its own goal, and I don't see how it's "abused". So far we have seen an example of use which you recognized as reasonable, and which is endorsed by our own manual,, and no examples of abuse. > PHP_FUNCTION(session_set_save_handler). > Advocate OOP best practice. i.e. Use INTERFACE when user is required to > implement all required methods. There's no OOP best practice that says you can not extend classes and override some of its methods in order to modify parent's behavior. On the contrary, doing this is one of common OOP practices. > And provide good API (both internal/user). e.g. Missing functions like > user serializer, gc, create_id. If you want to provide additional API, by all means please make an RFC. But I do not see how removing this class is required for providing any API. > If user need native handler, they should use it directly. IMO. I do not see any reason for that. You can clearly use native handler and add modifications for it. In fact, that is exactly why that class exists. > I would like to discuss one by one. Shall we discuss user serializer? > What do you think? Again, if you want to propose new feature, by all means please do. I still don't see how it requires removing existing classes. This is a very big BC break and requires very big gain to justify, and so far the gain was not shown I think. -- Stas Malyshev smalyshev@gmail.com