Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100721 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62988 invoked from network); 20 Sep 2017 17:10:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2017 17:10:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilija.tovilo@me.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ilija.tovilo@me.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain me.com designates 17.142.194.252 as permitted sender) X-PHP-List-Original-Sender: ilija.tovilo@me.com X-Host-Fingerprint: 17.142.194.252 pv33p00im-asmtp003.me.com Received: from [17.142.194.252] ([17.142.194.252:54349] helo=pv33p00im-asmtp003.me.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/39-62331-201A2C95 for ; Wed, 20 Sep 2017 13:10:27 -0400 Received: from process-dkim-sign-daemon.pv33p00im-asmtp003.me.com by pv33p00im-asmtp003.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0OWL000008OYIU00@pv33p00im-asmtp003.me.com> for internals@lists.php.net; Wed, 20 Sep 2017 17:10:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=04042017; t=1505927423; bh=s7ZyZZ4dieheORw2x0uO2qQ/yDigxkVtnnUnMtuZqa0=; h=Date:From:To:Message-id:Subject:MIME-version:Content-type; b=DsC+8+jkxdjQdX1PL0frJoVM4/91+/5poVdbka3QlQxUPxKui3+yqA99ZGc3pZhJ2 8dv9HigYDCPPYHD9xHkPoEFNbV0YXgcJcvOUQ41sRGuccAYVu6O32068tP/f4M442c WZ5QJiF+oDKZBnQucAKKI88e4Y0C1mhqSNKwgYNbf2ySa8r2Uo9eUrh12neXJCb47q lmyLUCUHWX//3YU/BM+zQrDZkfcIoPIKKhrWqJhq1/u9c1qGOMpQqMeLpVsthWMtso YYHdDgF0PySJZOOca/1wqI4+qL2aNj0U9/FHoIEorCVhLfWWMmmjDDU0YTncq4tssJ chqx5X1/H5QEA== Received: from icloud.com ([127.0.0.1]) by pv33p00im-asmtp003.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0OWL006Z8914Q120@pv33p00im-asmtp003.me.com>; Wed, 20 Sep 2017 17:10:19 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-20_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=72 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709200232 Date: Wed, 20 Sep 2017 19:09:42 +0200 To: Derick Rethans , "Christoph M. Becker" Cc: PHP internals Message-ID: <2ee41726-5504-48d2-bed6-288a0ea46989@Spark> In-reply-to: <9c057f0c-5235-2e94-64a0-b6fc19403bba@gmx.de> References: <9c057f0c-5235-2e94-64a0-b6fc19403bba@gmx.de> X-Readdle-Message-ID: 2ee41726-5504-48d2-bed6-288a0ea46989@Spark MIME-version: 1.0 Content-type: multipart/alternative; boundary=59c2a0f5_327b23c6_aedc Subject: Re: [PHP-DEV] Confusing type mismatch error messages From: ilija.tovilo@me.com --59c2a0f5_327b23c6_aedc Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > And actually, I still would=C2=A0be surprised to see such an error mess= age. This happens when you annotate your function incorrectly: https://3v4l.org/CoUss On 20 Sep 2017, 19:08 +0200, Christoph M. Becker , w= rote: > 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, bu= t > > > David hinted at the potential BC break, and Joe closed the PR later= > > > stating that such change would require an R=46C. > > > > > > In my opinion, it would be sufficient to change the error message s= o > > > that the canonical name of the type would be used, i.e. =60bool=60 = and > > > =60int=60, respectively, so the message above would read: > > > > > > =5B=E2=80=A6=5D must be an instance of boolean, bool given, =5B=E2=80= =A6=5D > > > > Or why not: > > > > =5B=E2=80=A6=5D must be an instance of class boolean, boolean given, = =5B=E2=80=A6=5D > > > > but I guess we then need to also use =22trait=22 or =22interface=22 a= s 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 =E2=80=93 an= d > actually it is not. > > -- > Christoph M. Becker > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --59c2a0f5_327b23c6_aedc--