Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80578 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46513 invoked from network); 15 Jan 2015 17:16:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 17:16:40 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:45094] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/92-34371-7F5F7B45 for ; Thu, 15 Jan 2015 12:16:40 -0500 Received: by mail-ob0-f174.google.com with SMTP id wo20so4653818obc.5 for ; Thu, 15 Jan 2015 09:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=pcHOKUpCd6qeov79vQxzH86XlWtgBzBM0SIKWJ3CrOE=; b=WAs/3phOZEAD6+uRQCqjxusSo03H7Sxu0LxG98f8pfKIbi3I+P6MGD/UohsYR2WDO/ cp+pirkHZZayTZASjRfPWMwxu6u/0SnF6uw4PgskH4Juhle+9dpojgSQM/gsZxllKAi/ 5N9vS1A9wPhTfC4Uyi/65FL5yG0W83UMMn+w0VxpNfLkQ7zh9Uu48NOglad5DMmNjyO6 k0ilNdc5J4v0u1OCq94giLQycLM88LeSCs9UWtkjUeoX+CKXHvKP5PRE55cvE4BH/w7D waCD1ntqZvg/ibx6sBuN7isCO0Qx7TUuxtOASguZ1uSYfSl7npc2wdcYvMA7SkMw1Fpp ZZ4Q== MIME-Version: 1.0 X-Received: by 10.60.92.40 with SMTP id cj8mr6495127oeb.43.1421342197316; Thu, 15 Jan 2015 09:16:37 -0800 (PST) Sender: morrison.levi@gmail.com Received: by 10.76.103.101 with HTTP; Thu, 15 Jan 2015 09:16:37 -0800 (PST) In-Reply-To: <0DD30A0D-E7CA-4150-83E0-8FD46635279C@ajf.me> References: <0DD30A0D-E7CA-4150-83E0-8FD46635279C@ajf.me> Date: Thu, 15 Jan 2015 10:16:37 -0700 X-Google-Sender-Auth: ItSue9aTUA-pN0PQm_mbbnKF-qU Message-ID: To: Andrea Faulds Cc: internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: levim@php.net (Levi Morrison) On Thu, Jan 15, 2015 at 9:55 AM, Andrea Faulds wrote: > Hey Levi, > > Upon further thought, I=E2=80=99m not super-enthusiastic about this. As h= as been pointed out, it=E2=80=99s a pretty serious BC break, whether code c= an be automatically updated or not. PHP 4 constructors may be obsolete, but= an awful lot of code uses them. > > 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 de= fined a PHP4 constructor, and would encourage migration away from them, but= wouldn=E2=80=99t prevent existing code from working. 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. 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. 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. 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. What do you guys think?