Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50089 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73349 invoked from network); 3 Nov 2010 01:39:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Nov 2010 01:39:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:65530] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/10-07219-A3DB0DC4 for ; Tue, 02 Nov 2010 20:39:07 -0500 Received: by bwz13 with SMTP id 13so303661bwz.29 for ; Tue, 02 Nov 2010 18:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=j4IR3Onrpf5E6XdFIk/iofIQJliEgbFy/Puov+6m2C4=; b=TZY9LvRYPLgph8f0fR8u/EzlUZquYyPVAj84zBkexyNvmApH5j90OB8uxFGrOaaybQ n3MCvSLl3ToTIisBo+zjc0PgEJzaJkXeSHDZUIgaF+dpqb4ytP27S9FfftIJa+Tc+FDw 3sNr2SCkuoKFQ7kwl3dxjLh2MyA39Di7rR9uo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=b12XbgeM2Sn/K2s+LTCZPrp/nbkpiytL5c25oZEM5fI1wDI7+zvDU1aZSwnLpB1HuJ O2sKCL/mXyodXjI+YNh3Bk3Ya4+lbNY965bR4kzRHudowC/XubzjmtpPPReJpARJWTCo YZKCf7GeJ45b7zSAFbhV8qyHaYxZ8W3utP6UU= Received: by 10.204.113.142 with SMTP id a14mr348497bkq.206.1288748343834; Tue, 02 Nov 2010 18:39:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.151.211 with HTTP; Tue, 2 Nov 2010 18:38:43 -0700 (PDT) In-Reply-To: <20101024223825.GC19835@gerbil.thgnet.it> References: <20101024223825.GC19835@gerbil.thgnet.it> Date: Tue, 2 Nov 2010 23:38:43 -0200 Message-ID: To: Giovanni Giacobbi Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016e6d64b2d3d3d9d04941c1b50 Subject: Re: [PHP-DEV] BC break in 5.3.2 -> 5.3.3 with "parent::" and __call/__callStatic From: felipensp@gmail.com (Felipe Pena) --0016e6d64b2d3d3d9d04941c1b50 Content-Type: text/plain; charset=UTF-8 2010/10/24 Giovanni Giacobbi > > Greetings, > > in reference to bug #52713 i'd like to inquire you about this decision > which actually broke my codebase in different parts. > > The situation is this one: > > class ActiveRecord { > > public function __call($method, $args) { > if ($method == "getFoo") { > // implement some default behaviour for getFoo() > } > } > > public function __callStatic($method, $args) { > // do some other stuff > } > } > > > class Bar { > // override getFoo() to add some specific behaviour > public function getFoo() { > // do the specific stuff > parent::getFoo(); > } > } > > > Until version 5.3.2 this worked fine, starting from version 5.3.3 > parent::getFoo() calls __callStatic() instead of __call(). > > This is a really bad BC change which i thought you decided to accept only > in minor versions change and not patch-level versions change. > > Anyway, I would even be willing to do some changes to my codebase, but what > is the solution? I can't see any other way to do this with the obvious > assumptions that my design is good and that I don't know anything about the > parent class except there is a getFoo() method implemented somehow. > > My wish is that you restore the 5.3.2 behaviour, which sounds very > reasonable, and maybe introduce another way when you actually want to get > rid of the context, something like static:: > > The change has been reverted in SVN. Thanks. -- Regards, Felipe Pena --0016e6d64b2d3d3d9d04941c1b50--