Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94876 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86033 invoked from network); 6 Aug 2016 09:15:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2016 09:15:03 -0000 Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 209.85.220.173 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 209.85.220.173 mail-qk0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:35845] helo=mail-qk0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/26-33134-49AA5A75 for ; Sat, 06 Aug 2016 05:15:00 -0400 Received: by mail-qk0-f173.google.com with SMTP id v123so151031283qkh.3 for ; Sat, 06 Aug 2016 02:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=nFXlKXMejjukggHeql28mCgj6RPd2C25S8SDTeOu3S8=; b=yykKnwTQizTfZRMS/my/UF92YQsEvGi8xLz+PAERXqJ2P1wxzp5QoSwWRS6tvhSo9v wDXr+rARhHxgDGhuZMSPyzCptxgaLzvflYAKsrR6TlSJcmKK6QaplY4y7Jh2plfxepho oyqcPTGG2ku4FlBqyTmxNp91Ol68rnykD4BkbqeXbH3roNqeDKT36ZM79DwKoM7sBlaY cDDjItGDAyvhqGPVVuJg8kLQvR7P60uQ/JTG48Ff1cBRTpRNH9FuwHrb+k2W2xIm1N+i MpOf5R1RA2sC/MGbFQYab0HNSZNFIGi+RNcqy2M4qHqww0E4ybvCZR6w2cHgl5yTZlQv HX5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=nFXlKXMejjukggHeql28mCgj6RPd2C25S8SDTeOu3S8=; b=hY51bwvu9PN/4sRGOKrls3I55WgcMtNkkDIVSZnhSQHh59DJT/Pf7iM7PuXSYB8nim 4nEqBW7vgO6hwRbvD8aPEHbNfO4kXJlaP3hCvEzdsCHu5p9eOEA9j4ih+MmTJV5mTEY7 UVyzn1FvcwqMP/chTxAMhOrXbZjC254g8t8r5Qh1VO/ltKPag+8j31Z2XnaZGZNWQSeI k9vLwkYg5q/3jFygzwCUgJpzAlwED/Hcbo9u8vetLABZIFSoE1NKKhjqZvZlJP9kwsqS DARIDjx2sFhjeOcV6Lh3nqUAChaH2EnkzVxgFGcDlvE6ki5YpUz2u11hEMmBdAAwYQiR dK7w== X-Gm-Message-State: AEkoouvAerGAX+WWFjuyPN3FHWeqNNJyld7y4PDApCw898mwx9uVI5TgpCEw51rO+lYkX6q/7bBHA9743C1/zZeM X-Received: by 10.55.185.131 with SMTP id j125mr16653161qkf.138.1470474897526; Sat, 06 Aug 2016 02:14:57 -0700 (PDT) MIME-Version: 1.0 Sender: me@daveyshafik.com Received: by 10.237.55.138 with HTTP; Sat, 6 Aug 2016 02:14:56 -0700 (PDT) In-Reply-To: References: <01e3ed40-cf40-4a0e-aa03-0e4326257d7c@email.android.com> Date: Sat, 6 Aug 2016 02:14:56 -0700 X-Google-Sender-Auth: k7KUIxC3kxD6XI3mz_Rg-QrA1kE Message-ID: To: Joe Watkins Cc: Dmitry Stogov , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c049078eb275a0539639de1 Subject: Re: [PHP-DEV] Re: Change to Too Few Args Exception RFC From: davey@php.net (Davey Shafik) --94eb2c049078eb275a0539639de1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dmitry, I've tried to implement this myself, and it seems to work fine, but I end up with some weird (unrelated?) test failures after: https://github.com/php/php-src/compare/master...dshafik:too-few-args-except= ion Example test failure: =3D=3D=3D=3D=3D=3D=3D=3DDIFF=3D=3D=3D=3D=3D=3D=3D=3D 001+ Warning: file_get_contents(http://localhost:8964): failed to open stream: Connection refused in /Users/dshafik/src/ php.net/php-src/tests/basic/bug67198.php on line 29 002+ bool(false) 001- string(4) "PASS" 002- string(4) "PASS" 003+ 004+ Warning: file_get_contents(http://localhost:8964): failed to open stream: Connection refused in /Users/dshafik/src/ php.net/php-src/tests/basic/bug67198.php on line 30 005+ bool(false) =3D=3D=3D=3D=3D=3D=3D=3DDONE=3D=3D=3D=3D=3D=3D=3D=3D FAIL php://input is empty when enable_post_data_reading=3DOff [tests/basic/bug67198.phpt] and: =3D=3D=3D=3D=3D=3D=3D=3DDIFF=3D=3D=3D=3D=3D=3D=3D=3D 001+ Warning: Declaration of melt\core\DateTime::createFromFormat($format, $time, ?melt\core\DateTimeZone $timezone =3D NULL) should be compatible wit= h DateTime::createFromFormat($format, $time, $object =3D NULL) in /Users/dshafik/src/php.net/php-src/ext/date/tests/bug55407.php on line 7 =3D=3D=3D=3D=3D=3D=3D=3DDONE=3D=3D=3D=3D=3D=3D=3D=3D List of failed tests: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILED TEST SUMMARY --------------------------------------------------------------------- Test posix_getgrgid() function : basic functionality [ext/posix/tests/posix_getgrgid_basic.phpt] Test chdir() function : basic functionality [ext/standard/tests/dir/chdir_basic-win32-mb.phpt] Test chdir() function : usage variations - relative paths [ext/standard/tests/dir/chdir_variation2-win32-mb.phpt] Test getcwd() function : basic functionality [ext/standard/tests/dir/getcwd_basic-win32-mb.phpt] Test readdir() function : usage variations - sub-directories [ext/standard/tests/dir/readdir_variation3-win32-mb.phpt] Test readdir() function : usage variations - different file names [ext/standard/tests/dir/readdir_variation4-win32-mb.phpt] Test readdir() function : usage variations - operate on previously opened directory [ext/standard/tests/dir/readdir_variation6-win32-mb.phpt] Test rewinddir() function : basic functionality [ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt] Test scandir() function : basic functionality [ext/standard/tests/dir/scandir_basic-win32-mb.phpt] Test scandir() function : usage variations - different sorting constants [ext/standard/tests/dir/scandir_variation10-win32-mb.phpt] Test scandir() function : usage variations - different relative paths [ext/standard/tests/dir/scandir_variation4-win32-mb.phpt] Test scandir() function : usage variations - different file names [ext/standard/tests/dir/scandir_variation8-win32-mb.phpt] Test scandir() function : usage variations - different ints as $sorting_order arg [ext/standard/tests/dir/scandir_variation9-win32-mb.phpt= ] file_get_contents() test using offset parameter out of range [ext/standard/tests/file/file_get_contents_error001.phpt] Test lstat() and stat() functions: usage variations - file opened using w and r mode [ext/standard/tests/file/lstat_stat_variation13.phpt] Check cli_process_title support on Unix [sapi/cli/tests/cli_process_title_unix.phpt] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I can't see how my change has affected this at all; but maybe I missed something? Could you review and see if you spot anything? Thanks, On Sat, Aug 6, 2016 at 12:33 AM, Joe Watkins wrote: > Morning all, > > Good idea, +1 for just doing it ... > > Cheers > Joe > > On Sat, Aug 6, 2016 at 8:18 AM, Dmitry Stogov wrote: > >> I don't see a big problem accepting this. The change is really minor, an= d >> makes sense. >> >> Dmitry. >> >> On Aug 6, 2016 5:26 AM, Davey Shafik wrote: >> Hey all, >> >> I know this is a little late in the process, but it's something I've >> noticed while prepping some content around 7.1. >> >> This RFC: https://wiki.php.net/rfc/too_few_args >> >> Passed, and has been implemented, but I feel that throwing an `\Error` >> exception is a mistake. I think we should another more concrete exceptio= n >> class for this error: >> >> `\TooFewArgumentsError extends \Error` >> >> A use case where this may trivially occur is where you are using argumen= t >> unpacking and the unpacked array is too small. Writing this, just looks = bad: >> >> try { >> foo(=E2=80=A6 $args); >> } catch (\Error $e) { } >> >> compared: >> >> try { >> foo(=E2=80=A6 $args); >> } catch (\TooFewArgumentsError $e) { } >> >> Thoughts? Dmitry? >> >> Given the tiny change this is, and that is backwards compatible with the >> original RFC, I would like to add this to 7.1 for beta3. >> >> I think I can make this change myself. >> >> - Davey >> >> >> >> > --94eb2c049078eb275a0539639de1--