Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95267 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13990 invoked from network); 17 Aug 2016 16:55:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2016 16:55:25 -0000 Authentication-Results: pb1.pair.com header.from=aaron@trowski.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=aaron@trowski.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain trowski.com designates 199.38.81.6 as permitted sender) X-PHP-List-Original-Sender: aaron@trowski.com X-Host-Fingerprint: 199.38.81.6 mercury.negativeion.net Received: from [199.38.81.6] ([199.38.81.6:53978] helo=mercury.negativeion.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/EA-45465-BF694B75 for ; Wed, 17 Aug 2016 12:55:24 -0400 Received: from localhost (localhost [127.0.0.1]) by mercury.negativeion.net (Postfix) with ESMTP id 1DD7B3E8C4E6 for ; Wed, 17 Aug 2016 12:55:21 -0400 (EDT) X-Virus-Scanned: amavisd-new at negativeion.net Received: from mercury.negativeion.net ([127.0.0.1]) by localhost (mercury.negativeion.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H9Q4Jae6zgKH for ; Wed, 17 Aug 2016 12:55:20 -0400 (EDT) Received: from [10.0.1.3] (unknown [192.119.134.23]) by mercury.negativeion.net (Postfix) with ESMTPSA id A2CBE3E8C4D3 for ; Wed, 17 Aug 2016 12:55:20 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) In-Reply-To: Date: Wed, 17 Aug 2016 11:55:20 -0500 Content-Transfer-Encoding: quoted-printable Message-ID: References: <0668D584-EE51-4932-85D7-01D8BF70E409@trowski.com> <15E198DD-FF66-475D-ABBC-54ECD2B6BF62@trowski.com> To: internals X-Mailer: Apple Mail (2.3124) Subject: Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names From: aaron@trowski.com (Aaron Piotrowski) > On Aug 17, 2016, at 11:45 AM, Marco Pivetta = wrote: >=20 > Since scalar types are invalid anyway if prepended with `\`, I see no = point > in producing a string with the `\` in it. >=20 > The current consumers of `Type` assume no `\` is prepended, and we = spent an > age and a half dealing with `\` being in front of class names in = doctrine > (and finally got rid of it). >=20 > This is not being really helpful, as it is. >=20 > Marco Pivetta >=20 > http://twitter.com/Ocramius >=20 > http://ocramius.github.com/ >=20 Scalar types do not have a \ prepended. Only class, interface, and trait = names. Can you show me some of the code in Doctrine that handles this? This = issue came up because of Doctrine prepending a \ in front of nullable = class names [1], resulting in `\?Type`, which of course is invalid. Unfortunately I think no matter what is done, nullable types just = created another headache for you. :-( Aaron Piotrowski [1] https://github.com/php/php-src/pull/2068#issuecomment-239983716 (Forgot to CC internals again... ugh)=