Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85030 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79269 invoked from network); 16 Mar 2015 11:43:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 11:43:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.114.167 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.114.167 spritz.beccati.com Received: from [176.9.114.167] ([176.9.114.167:45017] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/02-03331-9F1C6055 for ; Mon, 16 Mar 2015 06:43:54 -0500 Received: (qmail 26470 invoked from network); 16 Mar 2015 11:43:50 -0000 Received: from home.beccati.com (HELO ?192.168.1.202?) (88.149.176.119) by mail.beccati.com with SMTP; 16 Mar 2015 11:43:50 -0000 Message-ID: <5506C1ED.6080102@beccati.com> Date: Mon, 16 Mar 2015 12:43:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Nikita Popov , PHP internals References: <5505CFD2.5010609@beccati.com> In-Reply-To: <5505CFD2.5010609@beccati.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Reclassify E_STRICT notices From: php@beccati.com (Matteo Beccati) Hi Nikic, On 15/03/2015 19:30, Matteo Beccati wrote: > In PHP4 times it was in fact quite common to change inherited method > signatures to bend them to one's will and/or remove parameters and > hardcode them in the parent constructor call. We now know it is bad > practice, but I bet there's lot of code using these practices in > controlled situations. > > I'm going to attempt fixing the app code (including the bundled pear > libs) and report back. So... I've spent a few hours on the cleanup and I'm still far from getting a green build. As you mentioned in the RFC, turning E_STRICT into E_WARNING is going to be a BC-break for someone, and fixing this one in particular requires far more effort than a simple search/replace. For some applications it means heavy refactorings to ensure that all the inherited methods have a compatible signature. That's enforced even if the classes were never designed nor are expected to be interchangeable (e.g. PEAR and its packages, many of which extend PEAR itself), or if some "shortcuts" have been made (e.g. function foo() { parent::foo("BAR"); } ). I agree that it's a wrong usage of inheritance and we shouldn't encourage it, but maybe an E_NOTICE would be good enough to avoid such design mistakes. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/