Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80587 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70874 invoked from network); 15 Jan 2015 20:36:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 20:36:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=ipso@snappymail.ca; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ipso@snappymail.ca; sender-id=pass Received-SPF: pass (pb1.pair.com: domain snappymail.ca designates 50.97.106.214 as permitted sender) X-PHP-List-Original-Sender: ipso@snappymail.ca X-Host-Fingerprint: 50.97.106.214 mail.timetrex.com Received: from [50.97.106.214] ([50.97.106.214:55223] helo=mail.timetrex.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/91-61348-2B428B45 for ; Thu, 15 Jan 2015 15:36:05 -0500 Received: from mail.office.timetrex.com (unknown [184.68.39.238]) by mail.timetrex.com (Postfix) with ESMTP id 18DC020064 for ; Thu, 15 Jan 2015 12:36:00 -0800 (PST) Received: by mail.office.timetrex.com (Postfix, from userid 108) id C7B1681483; Thu, 15 Jan 2015 12:35:59 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.office.timetrex.com X-Spam-Level: X-Spam-Status: No, score=-107.9 required=4.5 tests=ALL_TRUSTED,BAYES_50, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from [10.7.5.9] (mikeb.office.timetrex.com [10.7.5.9]) by mail.office.timetrex.com (Postfix) with ESMTPSA id 00F6481453 for ; Thu, 15 Jan 2015 12:35:58 -0800 (PST) Message-ID: <54B8249D.2050101@snappymail.ca> Date: Thu, 15 Jan 2015 12:35:41 -0800 Reply-To: ipso@snappymail.ca User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54B7ED3A.6090805@beccati.com> In-Reply-To: <54B7ED3A.6090805@beccati.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: ipso@snappymail.ca (Mike) Wouldn't this one change render all code in PEAR as broken? Is the gain really worth it? I understand PEAR is basically dead anyways, but for better or worse there is still a boat load of code that is being used from it (much of which lacks decent alternatives), and as other people mentioned such a BC break is likely to add years to the adoption of PHP7, which doesn't do anyone any good. On 01/15/2015 08:39 AM, Matteo Beccati wrote: > Hi everyone, > >> I am proposing an RFC[1] to remove PHP 4 constructors in PHP 7. If >> accepted, methods with the same name as their defining class will no >> longer be recognized as constructors. As noted in the RFC, there are >> already many situations where we do not recognize these methods as >> constructors, such as in namespaces and traits and when `function >> __construct` is also present. >> >> Andrea Faulds has kindly written a utility that identifies when a PHP >> 4 constructor is defined[2]. It does not automatically change the code >> for liability reasons. The utility PHPMD[3] can also detect this but >> has a false positive when `__construct` is also defined. > > I still think this (and other) BC breaks should be avoided if we want to > maximize PHP7 adoption, but I've started working on this: > > https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/970 > > which is a patch to php-cs-fixer that would be helpful to ease my (and > other's) pain in case the RFC passes. > > I've tried using Andrea's own work and nikita's php-parser and good > results quickly, but ended up switching due to the lack of whitespace > support. > > > Cheers -- Mike