Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94452 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26655 invoked from network); 9 Jul 2016 14:16:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jul 2016 14:16:48 -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:52194] helo=mercury.negativeion.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/BD-18622-E4701875 for ; Sat, 09 Jul 2016 10:16:46 -0400 Received: from localhost (localhost [127.0.0.1]) by mercury.negativeion.net (Postfix) with ESMTP id D678A3C30AF8; Sat, 9 Jul 2016 10:16:43 -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 ebMf77UgEdBA; Sat, 9 Jul 2016 10:16:43 -0400 (EDT) Received: from [10.0.1.3] (unknown [173.225.150.231]) by mercury.negativeion.net (Postfix) with ESMTPSA id 2B5273C30AEA; Sat, 9 Jul 2016 10:16:43 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) In-Reply-To: Date: Sat, 9 Jul 2016 09:16:35 -0500 Cc: internals , Joe Watkins , davey@php.net Content-Transfer-Encoding: quoted-printable Message-ID: <60AC7828-990B-4B6D-A122-AB9C15C6DEAE@trowski.com> References: To: Levi Morrison X-Mailer: Apple Mail (2.3124) Subject: Re: [PHP-DEV] Re: [RFC][Vote] ReflectionType Improvements From: aaron@trowski.com (Aaron Piotrowski) >=20 > On Jul 9, 2016, at 8:17 AM, Levi Morrison wrote: >>=20 >=20 > The final vote was 5 in favor and 8 against. This RFC has been = rejected. >=20 While this RFC was rejected, ReflectionType::__toString() should still = be updated to include a ? for nullable types. This is a consequence of = the nullable types RFC. As mentioned in this RFC [1], the string = representation of ReflectionType should be a syntax-valid representation = of the type. Without adding ?, this will no longer be true. I do not = view this as a BC break. In fact, it is a BC break for PHPUnit, PHPSpec, = and Mockery to not make this change, as they currently depend on the = string representation of ReflectionType to generate code compatible with = the parent class or interface. Additionally, I propose adding a getName() method to ReflectionType that = returns only the name of the type, regardless of nullability. Casting = should not be required to get information from an object, but currently = this is the only way to get the type name from ReflectionType. Most = other reflection classes include a getName() method, this seems to have = been an oversight. Joe and Davey, what are your thoughts on this? Aaron Piotrowski [1] = https://wiki.php.net/rfc/reflectiontypeimprovements#backward_incompatible_= changes=