Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77129 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95160 invoked from network); 10 Sep 2014 05:57:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2014 05:57:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-oi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:43188] helo=mail-oi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/A0-24203-338EF045 for ; Wed, 10 Sep 2014 01:57:08 -0400 Received: by mail-oi0-f42.google.com with SMTP id e131so4185230oig.29 for ; Tue, 09 Sep 2014 22:57:05 -0700 (PDT) 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=gyflQo7sCuTD48VTbLDkjhjfBSFZorMRpaeCG08Ndhk=; b=P71HDIlMSRvq8xG/ewXK9N7FVe+USmh17uNwrBlU/cOv6uojvHnv+Kbbm87C1SvYSP Ko5/OLHAZMMe5Ei5Fr1q2XFSw3+NW9CAd4VHdbFwU/bcXS5hBXFiDFWhVh2xocQkC98g eW6t7Kzpxz0LPHgoBxQ7nOkeQkMRNvfpARaVWP8KV0RQJkflKMyA6vwl+yVE+8bX0BVp 698kIh+h7QK4QfaylqPbgprpogNpdVMmZcH7z7mEffSO1P8tRxq7s4zoXbvO/5wgCuWG MqIdIi2Xb5g5F2rs8drJEbTJnVQ63bYwbbfcbrt41Z/gWAjyvMELCd/AzebsszzrqgXV 4hng== MIME-Version: 1.0 X-Received: by 10.182.119.230 with SMTP id kx6mr392770obb.72.1410328625082; Tue, 09 Sep 2014 22:57:05 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.76.106.20 with HTTP; Tue, 9 Sep 2014 22:57:05 -0700 (PDT) In-Reply-To: References: Date: Tue, 9 Sep 2014 23:57:05 -0600 X-Google-Sender-Auth: dRYqcpv9IZs6ShlU3wvN9XhFO-0 Message-ID: To: Tjerk Meesters Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Deprecated functions From: levim@php.net (Levi Morrison) On Tue, Sep 9, 2014 at 11:42 PM, Tjerk Meesters wrote: > Hi, > > When I was fixing test cases on my `kill-ereg` branch I noticed a Reflect= ion test case for `ReflectionFunction::isDeprecated()`. > > The problem with such a test case is that you=E2=80=99d be chasing deprec= ated functions to tests against as we move along; this is the current list = of deprecated functions as taken from a typical 5.4 installation: > > Since 4.1.0: call_user_method, call_user_method_array > Since 4.3.7: mysql_list_tables, mysql_listtables > Since 5.3 : ereg, ereg_replace, eregi, eregi_replace, split, spliti, sql= _regcase, mysql_db_query, magic_quotes_runtime, set_magic_quotes_runtime, s= et_socket_blocking > Since 5.4 : mysql_list_dbs > > The above are, as far as I=E2=80=99m concerned, all potential candidates = for removal in PHP 7, so in order to reliably test a deprecated function I = would suggest introducing a hidden function with this signature: > > void __deprecated__() { } > > And mark that function as eternally deprecated using the ZEND_ACC_DEPRECA= TED flag. > > Thoughts? This sounds like a much better solution than what we have. The only way the test could be less brittle is if you could define a function and deprecate it in userland as part of the test. Since we don't have that capability and don't think we should add it I say +1.