Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100720 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61587 invoked from network); 20 Sep 2017 17:08:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2017 17:08:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:50919] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/D8-62331-870A2C95 for ; Wed, 20 Sep 2017 13:08:11 -0400 Received: from [192.168.2.106] ([79.243.117.113]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LrNE4-1dFvei1s4a-013ANS; Wed, 20 Sep 2017 19:08:04 +0200 To: Derick Rethans Cc: PHP internals References: Message-ID: <9c057f0c-5235-2e94-64a0-b6fc19403bba@gmx.de> Date: Wed, 20 Sep 2017 19:08: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 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:NJONx4xsWJUqzdo10puBw1D1GLwmLsEgAmhdsF1E1JzdQDjhGcV qe30Z5lOJque5K+ZpBsIAeAVQYPk9I00qORIOP0kFr9ZE+0fK+H1aSU2czEqmQ5Ns+LGTlS 0cTaZzKn/TZt/+4gEWWCYRki8NSNEEJdNMoTk45YQapHK08rhhkuON/Lg58ziVpdox43Jb8 c2SOKmsIqd9Qu+6OVUDgA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ng6yW/88hoY=:dz+opbPw8/82k+/ki2tvp7 0MqQzBw7V6lACXVrlsGlahMeFd0P/fE1x0dyySpDkc6DciIZJdksV/Afo6Rpbn0qsiFQ2JJVA igWR3XYL0aXDU7wcvyjOINSI1x26K8f//q3D05bAcuzs+5uNbtK+9Boez1JCA+Eguh2AV+JQ2 /78Qgpw28l3qvABLYwbTvQ6eUSeGIMWH97lORVwmY0dv4gSLEUStN+HF7mD0MjlLhAmSkTm2a qJQ+vQB5MkhXFsPC3tUcpSHPSSJ2yvBUqURgVDIXmMdgJ4l5rMuuhVqdeKAFy7PrFmupxysBn EZmINVLx0CYkdqnaDllVlX+Ylxt4WTJB7y+V19MGOPcCaG8ZJPXXaT78q/PPCOFMiV2w9rgIq WJwnSFSdoao7WC5DDGzle7mRYE3SK7Wsk8Cg1xqvDjFDvY5HRAFZT/TVWIFjQTYrp35rSpvFX 29rGPP7HPf7ktmnqlX1hYOnE+r/Y1G82AkcM4LPL5GWn3+FrLV/iB2Sj41nUPmA9fC/ZgWtuf SZBvIO+DMUGQ+79czwrDJIJX0NopQqs8PxMqqAlvPrYbqqDjqvoqVA7oFCM7hkxkVCFrNqBKm aS2GORh875HndTDuE6h63YoWsVC6ftgLkXlk9AInMJx2i9QRMp3siX7YPhjrqqV0h1ck4dhrX VOUSBgeGv/rj+kStlAnv/CR0g/uPVf2l9CvKoGdDR/FlECbyZTtY0vliAOQURj4lFqbIbSxhM 5THsVenezu/KZwfSDltfgXE3dhehTc5itUbxZLwfJ0X4uebC1/cCp7JS7jqJ81RRHJQOUf7C/ 3N3kbfv4bBntubUgbB22DeWFcZu3fCntQioSKBu0PLYglcNz40= Subject: Re: [PHP-DEV] Confusing type mismatch error messages From: cmbecker69@gmx.de ("Christoph M. Becker") On 20.09.2017 at 18:54, Derick Rethans wrote: > On Wed, 20 Sep 2017, Christoph M. Becker wrote: > >> 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, […] > > Or why not: > > […] must be an instance of class boolean, boolean given, […] > > but I guess we then need to also use "trait" or "interface" as words > there too. That has been suggested by Adam, but 62 tests had to be modified, pointing out the magnitude of this change. And actually, I still would be surprised to see such an error message. It should not be possible to have a class/interface with the same name as a scalar type – and actually it is not. -- Christoph M. Becker