Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64440 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58077 invoked from network); 26 Dec 2012 22:08:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Dec 2012 22:08:22 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.47 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.215.47 mail-la0-f47.google.com Received: from [209.85.215.47] ([209.85.215.47:58611] helo=mail-la0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/41-43002-4557BD05 for ; Wed, 26 Dec 2012 17:08:21 -0500 Received: by mail-la0-f47.google.com with SMTP id u2so11390497lag.34 for ; Wed, 26 Dec 2012 14:08:17 -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=CK0emFdq3bSF4uE3L9nKDujJCSz0V5pHB3IwTg59ca0=; b=sEiTiX7/XgjX8y0Zgrjcljzyg7i57+KRkfwfJLipi21I9X8/uEAZpfUs4xLFhUwOY1 Yn9UXLPUJlFeo0aebpAvMusUOKu63kc/lJ8G+iqWNODQ/zJL0Ie69xPnWtoJ/82fSgD0 LiOlK4ojdhBlagd4ABWyAOT7W2TlrQ3hMjpSMP7PWbXgXx+1BKoyvZoHVbT3YR5rRp2B wnRPxtJuqrE+cDY/fBFjg5iDjZLBE91TjTf0czKkODGNMWWodtYbfjfPo2yZnbzzrL5W 6tsnLDQiTeZxkXL/zuwbQ6AIouM3L3xpvtM5D/vHupEI2IwDhs/GsqHpDySievuxrrvZ 4caQ== MIME-Version: 1.0 Received: by 10.112.84.65 with SMTP id w1mr10895977lby.121.1356559697342; Wed, 26 Dec 2012 14:08:17 -0800 (PST) Received: by 10.112.4.168 with HTTP; Wed, 26 Dec 2012 14:08:17 -0800 (PST) In-Reply-To: <50DB6663.7010000@purple.org.ua> References: <8D.41.07178.7380BD05@pb1.pair.com> <50DB6663.7010000@purple.org.ua> Date: Wed, 26 Dec 2012 23:08:17 +0100 Message-ID: To: Eugene L Kovalenja Cc: PHP internals Content-Type: multipart/alternative; boundary=f46d0401696de071b104d1c8aa93 Subject: Re: [PHP-DEV] RFC: Add a deprecated modifier for functions From: nikita.ppv@gmail.com (Nikita Popov) --f46d0401696de071b104d1c8aa93 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Dec 26, 2012 at 10:04 PM, Eugene L Kovalenja wrote: > Hello, Khalil > > Could you explain the pros of your proposal in comparison with the next > one: > > > function somethingWillBeRemovedInNextVe**rsion() { > trigger_error('This function is deprecated. ' > . 'Please use "newFunction" instead. ', > E_USER_DEPRECATED); > > > // functionality below > > return 'something'; > } > > function newFunction() { > // ... > } > > somethingWillBeRemovedInNextVe**rsion(); > > > From my point of view, the modifier for this kind of things is the > restriction for developers, who want to inform user about details like "why > we are going to remove this functionality". > I agree with Eugene. It's much better to throw a E_USER_DEPRECATED error with a meaningful custom error message. So -1 on this. Nikita --f46d0401696de071b104d1c8aa93--