Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62869 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53132 invoked from network); 6 Sep 2012 15:01:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2012 15:01:06 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:42176] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/C9-03079-1BAB8405 for ; Thu, 06 Sep 2012 11:01:06 -0400 Received: by qcad42 with SMTP id d42so878414qca.29 for ; Thu, 06 Sep 2012 08:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wPNIWVpd2jyVOBvFeoByT1/zuLMJE/TYNYu4qZ62oL8=; b=KDsR1uOEivsY1e/ThibJLb40CisGMAIKzsub+BH/pE+AjazMg9ZI6iIGscuYEqEUr9 BRQ7PdBHi1VzQA8PX6lJUR653Vcdp5u0xGyh2oGG8eND7+orF763YBdjHLf+kKgpg2N0 iGTBRZkZSqfhrU7TDV9tOBgf7OmDbTZrC9cXSfUT6w4mRxMVrFcuyFleplPFoA5wpS6v GSj2LmNuwDUJtIAPr4f//kUEelqPgWFvE8bgJ+GNqkREbFf3iInUt15zyYUU4Z6Y1P8T M7WGTJE6XmPXVRLai7xTdWsRHniEMt0JWJBD0ctn24Z8Inxd+zUOgh9YsazCRlisS3pC z9EQ== MIME-Version: 1.0 Received: by 10.229.135.5 with SMTP id l5mr998283qct.5.1346943662361; Thu, 06 Sep 2012 08:01:02 -0700 (PDT) Received: by 10.49.96.40 with HTTP; Thu, 6 Sep 2012 08:01:02 -0700 (PDT) In-Reply-To: References: <5045AA9B.5080703@sugarcrm.com> Date: Thu, 6 Sep 2012 16:01:02 +0100 Message-ID: To: Levi Morrison Cc: Stas Malyshev , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] On BC and interfaces From: leight@gmail.com (Leigh) > Basically we shouldn't break any interfaces that are user-facing but > we are free to change things internally as much as we want as long as the > external interface is honored. So how do you actually go about adding a feature that requires an interface change? Take for example the SessionHandler class, that implements SessionHandlerInterface. Now lets say you want to add functionality to the class that allows a user to override create_sid, and provide user-generated session ids. It doesn't make sense to add it to the class and not the interface, so what do you do? * Add to SessionHandlerInterface and break BC? * Create SessionHandlerInterfaceEx that extends the original, and have the the class implement that? * Create SessionHandlerInterfaceEx that contains only the new method, and have the class implement both interfaces? * Add to the class, but do not touch the interface?