Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97533 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62652 invoked from network); 6 Jan 2017 17:13:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2017 17:13:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:37284] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/76-23307-F40DF685 for ; Fri, 06 Jan 2017 12:13:51 -0500 Received: by mail-wm0-f50.google.com with SMTP id t79so38757256wmt.0 for ; Fri, 06 Jan 2017 09:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yfnDsSspe6lJ0Qq2C2KFTrEQ+V60KxPHyNcH1WUnqYE=; b=IOzFuDVC2LyBfi1hevFS1i2G4EbMilJNyEUCENQpxSCsb3/sZtTnBYXIlNgBQ0k8L4 CJktTs5zwlZP33A3zwbZnhplhPRF45g26vYe93ewUl6tPY6UZw1w3dPO8+YpeEasjpkj iM/USbPXL+6AnFz3mS/llVUVSEHx1sdufCF9VkZPbg23W07+e6m85S7sfR3Nuxr9kPbV epx3/854EeldDN59VNdSR0bGsX0nhbE1nL8LYXqL/T6lToNvoa3Yvn8g/hpTjpt3Vpm0 NGmM/a81PTf9g0BWf73DgEQOjLDtezP+9sFb7nAU7bSlcsFQtiGCA3zHm0PCOlyf6ccF +2Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yfnDsSspe6lJ0Qq2C2KFTrEQ+V60KxPHyNcH1WUnqYE=; b=BtY5bwajEYhXUCxAkM1HA4CP6Az4AR31v5JWrcXoPtSCoZZYQB++QIiRK1k049EI3B b0larPXwlk7NW1A4gwEybsYff3lWfgvu5VYTAtVIbg9UcqMkAGPYULtGM6fmEVg09UuT mSwtz8GHTnsfRv2ygusUSHHAq7pKUTB0FTsdmZCM2K3cIrwTYL/MbmHrf3+k3UnE3oE8 c4LPjuIIPfeT9CDyEdlszbB4p4Bvv5fj0E6daBlj78UbgbKzmP+/KFmb9WLdMPKPRR+3 d55Tmj+w7ql8eLfT80VANSP2WZlaQhhO0Nj/iPGVeCGytirU5H8PkbDXPHnyubJ9Okab Wn0Q== X-Gm-Message-State: AIkVDXI5tFqkHu0UrUXHM+YY97YyvzyZ+C3yHe3xzM8HI+XkUAPsDdos5Xqa+ZsbzQECIVXqGYXZIAFw3BF4tw== X-Received: by 10.223.163.207 with SMTP id m15mr1878544wrb.66.1483722828610; Fri, 06 Jan 2017 09:13:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.173.106 with HTTP; Fri, 6 Jan 2017 09:13:47 -0800 (PST) Received: by 10.194.173.106 with HTTP; Fri, 6 Jan 2017 09:13:47 -0800 (PST) In-Reply-To: References: Date: Fri, 6 Jan 2017 18:13:47 +0100 Message-ID: To: Wes Cc: PHP Internals List Content-Type: multipart/alternative; boundary=f403045f1b4e2503d1054570247d Subject: Re: [PHP-DEV][RFC][VOTE] Throwable error code's type generalization From: ocramius@gmail.com (Marco Pivetta) --f403045f1b4e2503d1054570247d Content-Type: text/plain; charset=UTF-8 Hi Wes, On 6 Jan 2017 18:03, "Wes" wrote: Greeting fellow elePHPants and happy new year. I've just started the vote for the RFC in subject. You can find it here: https://wiki.php.net/rfc/throwable-code-generalization Hope it's all fine because this is my first RFC... :P Voting will end 13 Jan at 5 PM (UTC). Thank you. As previously discussed, this is a BC break that affects any consumers of `Throwable` or `Exception` using `getCode()`. The fix for PDO is not "allow any garbage in the exception code", but "fix PDO", reducing the BC break surface to a minimum. Adding an explicit `int` return type check is sufficient and would get immediate feedback from people trying new RCs. Changing an interface (!!!!!!!) by breaking covariance is not a solution. If you need to add more context to an exception, consider adding a new interface that just defines an accessor for that new context information. Greets, Marco Pivetta --f403045f1b4e2503d1054570247d--