Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80579 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48952 invoked from network); 15 Jan 2015 17:21:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 17:21:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:51449] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/23-34371-E17F7B45 for ; Thu, 15 Jan 2015 12:21:35 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 84CD0B00091; Thu, 15 Jan 2015 12:21:31 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xESh04UXF9NE; Thu, 15 Jan 2015 12:21:31 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id BB992B00068; Thu, 15 Jan 2015 12:21:30 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: Date: Thu, 15 Jan 2015 17:21:27 +0000 Cc: internals Content-Transfer-Encoding: quoted-printable Message-ID: <1F81DF34-0811-4E71-A5F3-DFAD4B431B66@ajf.me> References: <0DD30A0D-E7CA-4150-83E0-8FD46635279C@ajf.me> To: Levi Morrison X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: ajf@ajf.me (Andrea Faulds) Hey Levi, > On 15 Jan 2015, at 17:16, Levi Morrison wrote: >=20 > On Thu, Jan 15, 2015 at 9:55 AM, Andrea Faulds wrote: >>=20 >> A better solution, IMO, might be simply to add a deprecation notice. = This would make it obvious during development if you=E2=80=99ve = accidentally defined a PHP4 constructor, and would encourage migration = away from them, but wouldn=E2=80=99t prevent existing code from working. >=20 > Possibly. The reality of my position is that I am unhappy about our > current constructor situation. Having `__construct` and only > half-heartedly supporting old-style constructors for the next several > years (maybe ten?) does not sound good at all. I agree, it doesn=E2=80=99t. Unfortunately, I=E2=80=99m not sure if we = have much choice here. > Removing one of the constructors is a nicer end product than fully > supporting both, in my opinion, which is why I proposed dropping it. I > was hoping that a deprecation notice in 5.7 would be sufficient along > with other standard migration tools and documentation, but since we > have decided to not release 5.7 perhaps a deprecation would be better. >=20 > At the same time I'm not thrilled about the amount of deprecation > notices that could be generated if this is really as common as people > seem to make it. I generally don't see these older constructors, but > it seems when people have them they have *a lot* of them. Yeah, I=E2=80=99m wondering about that. I imagine that a single request = would probably result in a massive spew of E_DEPRECATEDs, and that=E2=80=99= s not good. :/ > I was okay > with this in a theoretical 5.7 release to ease migration because it > had a fixed lifespan of one release cycle but in version 7 it will > stay for the duration of all PHP 7 releases. >=20 > What do you guys think? I wonder if we could hopefully get rid of them for PHP 8 or something, = since it=E2=80=99s deprecated=E2=80=A6 but then, if we don=E2=80=99t get = rid of them now, we might never. I=E2=80=99m not sure, really. -- Andrea Faulds http://ajf.me/