Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100716 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51871 invoked from network); 20 Sep 2017 15:23:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2017 15:23:12 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.21 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.21 mout.gmx.net Received: from [212.227.17.21] ([212.227.17.21:56217] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/57-62331-CD782C95 for ; Wed, 20 Sep 2017 11:23:11 -0400 Received: from [192.168.2.106] ([79.243.117.113]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MegeC-1djmin0Lrk-00OFtd for ; Wed, 20 Sep 2017 17:23:05 +0200 To: PHP internals Message-ID: Date: Wed, 20 Sep 2017 17:23:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:teyEibGjdxCauA2r1Od5MvStQzr2zZYrLIRKbGdkPKcLUGzHUDV 6ciO8PZiTHxzSryVtGxS5SM7xMWK20nWrWDYfpH1zGXemKLbWdAMB0dG1RUgNzZqzStWA9g NpnzUpIZtUDwd07kgTF8AqtcUl3Vznku5a8KusiCVTcPKf/e301UXMHHQTe4iVTxqtNlKoK NuyPga+GhCj9Vu1S7BGLQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:bVqGt5+p63s=:cKQwsqw9sb1rC/z/A3osO5 Cuy/JwFHB8uBh1Q73cLX/3rnAIbTld+kADLdJHEbT6wDuhNxMGnJGM1/hsEOFGREE+g71i8Re 40FjjF/6l+aeI5Qy7hKbrE8JkTbxWcqc5S4+PyulF7QeEaahWtodhDczmKMjwvoHAUTH1k/vT 9uYJfwo9e6CR+4xiZC9KxmXqanp1J20aNXeQZk0T3UL4G2/FWhcy35qzE+yjUlH6wEAqWtkWQ xlxgfP3AyEeDQuftNE0/wOXjtAzDC2Y48IUvlfyIuhK4bfp48qAFNYQocxw+2I4VHpTJE6EeY k6NIJMRBipDzbqEJNYi4OEmJXvfvbhtMLwivcIyTZqOYvOalYiywqsPvXJ95riOyLeRDFwjk3 dJs9ePiShnirLMs7yD72AxdtvQNej3AITIXGTS6lTv/LiEuGY/UZ0yBGQSmZ+dMKtl48qfmNX BB446U9ZSRZXCruLCpxBjfcHG8k21Zr+VFSwjCeHkXwPdD2nyVdnc2CwOX47wVlibisIds2wB 8fDzc7ibdZTZceB3u6FHbBBPAHv+3QBav+wXln1kCzz/hlBfCbzZhr2vWtV/KrVW1uCmqegrI 2jqR4j/xtPxXhl7TPJntSaaX897fErr/HWuI7FqXTWmKBFIiRaPRpE8mHDu/hOOk+vWv5WZZN WDT/+iniw9BwJdQ07mMjWwSPjTVDkMoA1b1GD+Ixc+ieYf5SM3U2sYF7oFmuXnH6PfoyURPfu 5ypb8GFzqu3lMb2dLV7SoHIovlOQo9SezFLja0gTj54t3V1GOwKtKFV6BUips2GAulxZiSiBP KJ8xdlBgTxVEMKkA3JiOH+44JrQ2IjDlNDf3BT12v5uZcLHw20= Subject: Confusing type mismatch error messages From: cmbecker69@gmx.de ("Christoph M. Becker") Hi everybody! If a type declaration inadvertently uses `boolean` or `integer` (instead of `bool` and `int`, respectively), the error message is rather confusing: […] must be an instance of boolean, boolean given, […] This issue has been filed as , and Adam submitted to fix that, but David hinted at the potential BC break, and Joe closed the PR later stating that such change would require an RFC. In my opinion, it would be sufficient to change the error message so that the canonical name of the type would be used, i.e. `bool` and `int`, respectively, so the message above would read: […] must be an instance of boolean, bool given, […] This change would still be a BC break, but at a far smaller scale than Adam's PR would have been. So I am asking for opinions whether this change would be worth the BC break, and whether a respective RFC could target PHP 7.3, or would have to wait for PHP 8. -- Christoph M. Becker