Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85633 invoked from network); 19 Nov 2014 03:46:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2014 03:46:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.41 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.218.41 mail-oi0-f41.google.com Received: from [209.85.218.41] ([209.85.218.41:41560] helo=mail-oi0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/C0-15277-F921C645 for ; Tue, 18 Nov 2014 22:46:39 -0500 Received: by mail-oi0-f41.google.com with SMTP id a3so7012242oib.28 for ; Tue, 18 Nov 2014 19:46:35 -0800 (PST) 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=cKY8fDGD849zavZ7AISQ/N/488EPYHpKVmuqTpaYJ1k=; b=Iiq+PKxci/T2YhEyQNBaXCZWJZ7FA15syFIOpjheYtzUmJCG0sUZJMQ8NCVj4chRns d3x/HOCnWLzr1Vg0zVvILzbIzpdqvEA+5Bd5b753sZtg72CxbBOuYeVCi+x2Ug+oBY8g YFCoq/ONNEnAxOsPbdxldn/0jb47jbuiYmIbBwaDgnK+o1U2SczsPZnA94x9vW+woZI6 hR0DrVDVn0bnpS4qVCYGSfF5wTqaFCVjQjn+/2g14JEchY/X3P4MQAG6YaiOfgBePeSu UQ75I3sbRjsvN8McXJFNhLMs/MuRwCncmzcn4CygnsuIpqtBiHe4ER9iLi6yIzpdfC2T r4wQ== MIME-Version: 1.0 X-Received: by 10.202.169.200 with SMTP id s191mr28778638oie.7.1416368795708; Tue, 18 Nov 2014 19:46:35 -0800 (PST) Received: by 10.202.227.133 with HTTP; Tue, 18 Nov 2014 19:46:35 -0800 (PST) In-Reply-To: References: Date: Tue, 18 Nov 2014 19:46:35 -0800 Message-ID: To: Julien Breux Cc: Levi Morrison , internals Content-Type: multipart/alternative; boundary=001a113cb036f0750505082e0e28 Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: kris.craig@gmail.com (Kris Craig) --001a113cb036f0750505082e0e28 Content-Type: text/plain; charset=UTF-8 On Tue, Nov 18, 2014 at 3:26 PM, Julien Breux wrote: > I think that it is great time to end to PHP 4 constructors system for PHP > 7. > > IMO, It's a good RFC. > Agreed. I was going to suggest we throw E_DEPRECATED for 5.x, but you already have that covered in the RFC. I don't see anything wrong with this proposal, in fact. In hindsight, it probably would've been better if we had started raising E_DEPRECATED for it back in 5.0, but better now than never. We certainly have no obligation to support BC on features that became obsolete with PHP 4. +1 on this. --Kris > > On Wed, Nov 19, 2014 at 12:11 AM, Levi Morrison wrote: > > > Dear Internals, > > > > 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. > > > > Cheers, > > Levi Morrison > > > > > > [1]: https://wiki.php.net/rfc/remove_php4_constructors > > [2]: https://github.com/TazeTSchnitzel/PHP4_Constructor_Finder > > [3]: > > http://phpmd.org/rules/naming.html#constructorwithnameasenclosingclass > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > --001a113cb036f0750505082e0e28--