Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80826 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88928 invoked from network); 19 Jan 2015 15:14:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2015 15:14:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.176 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.176 mail-we0-f176.google.com Received: from [74.125.82.176] ([74.125.82.176:44988] helo=mail-we0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/98-64889-16F1DB45 for ; Mon, 19 Jan 2015 10:14:42 -0500 Received: by mail-we0-f176.google.com with SMTP id w62so5494550wes.7 for ; Mon, 19 Jan 2015 07:14:39 -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:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=tYjQcimfWKoMZsKFeP2Z7D4E6okkuZ77QelxIsxE9Lg=; b=DpovOs30+Vvy46i9I1oTVARP8UruGtTva4cf1XyJkRth8wke32MZ1fAXcoBeM+IjAe 8FZRiAYPePwooVsqHucij6PGBnbeJYfznkZsYbp4rOO8ax/KArdCK7TAEC4jIjMXumdD l7pf63Qq0zOTd0f8O3paPleQSJRqyE7BycFiD8luO3tI09Md1nDvnCaeG25SA2yGx0tL jXTgIkPk6w0cXylTFSu9CAkrD51BvaE2Bv+eurLViPxFCb8LyCjSQXbaT0GExy3alFfu kOyg8lcBe62t2O+Qc35OwmFp7OdD0sD3eQxtoiSK2yJZbE5RADMWU2IWgJmDG47RmUCq 8urg== X-Received: by 10.180.12.50 with SMTP id v18mr27167848wib.34.1421680479205; Mon, 19 Jan 2015 07:14:39 -0800 (PST) Received: from [192.168.0.172] ([62.189.198.114]) by mx.google.com with ESMTPSA id gl5sm18002031wib.0.2015.01.19.07.14.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jan 2015 07:14:38 -0800 (PST) Message-ID: <54BD1F32.6070802@gmail.com> Date: Mon, 19 Jan 2015 15:13:54 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP-CVS] Broken apps From: rowan.collins@gmail.com (Rowan Collins) Ferenc Kovacs wrote on 19/01/2015 13:25: > On Mon, Jan 19, 2015 at 10:49 AM, Dmitry Stogov wrote: > >> Despite of PEAR, I also found few other apps, from my usual test list, >> broken - Typo3, Xoops, SugarCRM. >> Magento is broken long time ago by "unified variable syntax". >> >> I'm really unhappy with this direction... >> >> Thanks. Dmitry. >> >> > I guess you already reported it to the pear guys, but just to be sure: > Tyrael | [17:17:14] laruence: you can ask the guys at #pear or simply > report the problem > Tyrael | [17:28:27] on github > Tyrael | [17:28:52] https://github.com/pear/pear-core > Tyrael | [17:35:55] as far as I can see all of the methods in > https://github.com/pear/pear-core/blob/06b171273752dc2012018067a3a3dd3505cb9c51/PEAR/Installer/Role.php > should be changed into static > Tyrael | [17:36:09] they are all called statically > Hm, I wasn't aware quite how strict this change was - I'm definitely on board with not allowing $this from an incompatible context, but thought it would only be access to $this that was made illegal, not the call itself. HHVM takes the approach of simply leaving $this undefined, but appears to special case get_class($this). http://3v4l.org/gKWBD http://3v4l.org/0gabo Note that all the methods in that class are actually annotated as static using PHPDoc, but the file is annotated as compatible with both PHP 4 and 5. I suspect that there will be a lot of cases like this, where the methods are fully static, just not declared with the keyword (for compatibility with older versions, or just laziness); there is no risk of "$this from incompatible context" there. Regards, -- Rowan Collins [IMSoP]