Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94454 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31521 invoked from network); 9 Jul 2016 15:12:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jul 2016 15:12:48 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.171 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.192.171 mail-pf0-f171.google.com Received: from [209.85.192.171] ([209.85.192.171:33709] helo=mail-pf0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/AE-18622-07411875 for ; Sat, 09 Jul 2016 11:12:48 -0400 Received: by mail-pf0-f171.google.com with SMTP id i123so21758261pfg.0 for ; Sat, 09 Jul 2016 08:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=V/gPEVL1bW3R3Jr3VKTVrJNzObwiQHAm5Yh48NT4HgY=; b=PC9YzLVFxn0u6h94ILzYuu0Gk1MgV4Ry6d75s7xDP7hJQlgotkjby9miUW2NIxYEGP 4h+B4Hr9BGl15+Vm7rvGu0tvkdbOyyeKJ1G3avjT3ghPL282ml3t0dhKtcvc+5J0IVCg bDkdZv7hkZehMOlRZRvqPm1nd9GXTSvwGwcP4GDdKPqYbEwckwTak0lzSJfrsIPKwnqH //JxuCV/DgbCtmWNuwGq++NgZaOX47ZQL1g6Tpa1/j0Ig9Xk0l2IMlAYrHKtP28rYg/n F4L5GA02bJY2zXCnQ1muUhHEal0DD9HK4mvVPbPpv0Ziy7HYiuu2cRjt0nNT7YbnxC5r hynw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=V/gPEVL1bW3R3Jr3VKTVrJNzObwiQHAm5Yh48NT4HgY=; b=DvcXo68SKbGd0yRfmfBf1z7sF9j3wpLwRgqRqbrLkDObABSJpnO9CM5nSUcxmEq0rS SvBzru063OzdCJ2SP40WEqC6DEXr29Y05sdYcRanbVZsW7Wy71mmDxNLW6GCtTl8Bn+G nd4wmuiTTWLbYoCr562sv/eeuxQnAJkAvzeEWLwPUSpK0KFibrEFQgi9L6/YmzGqhECi a2/e5Afzv8J5a7et1CAxF5RVfv9xVqRDtlJJ0djjG31XeDKKOidysI9ZmvletBmhxy/0 dS4ZEhZ8dgXXvOfYNJrniQ3ebysXjFExpr6StIKPv1dQC1iUI+nPu4xtaOehnIqS4wa4 L6CQ== X-Gm-Message-State: ALyK8tKWzcjUHp0TDoutKNHEF2Z5ChfNVYgL0Xo6xsKCSELNAN6W+3EWeDEuBX8ubJzTGy9NanpVZJB7U0b+yA== X-Received: by 10.98.29.81 with SMTP id d78mr19415287pfd.142.1468077165038; Sat, 09 Jul 2016 08:12:45 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.66.24.42 with HTTP; Sat, 9 Jul 2016 08:12:44 -0700 (PDT) In-Reply-To: <60AC7828-990B-4B6D-A122-AB9C15C6DEAE@trowski.com> References: <60AC7828-990B-4B6D-A122-AB9C15C6DEAE@trowski.com> Date: Sat, 9 Jul 2016 09:12:44 -0600 X-Google-Sender-Auth: Pnsg8PqC7fyAi2eOFAi3L-jfxYg Message-ID: To: Aaron Piotrowski Cc: internals , Joe Watkins , Davey Shafik Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [RFC][Vote] ReflectionType Improvements From: levim@php.net (Levi Morrison) On Sat, Jul 9, 2016 at 8:16 AM, Aaron Piotrowski wrote: >> >> On Jul 9, 2016, at 8:17 AM, Levi Morrison wrote: >>> >> >> The final vote was 5 in favor and 8 against. This RFC has been rejected. >> > > While this RFC was rejected, ReflectionType::__toString() should still be= updated to include a ? for nullable types. This is a consequence of the nu= llable types RFC. As mentioned in this RFC [1], the string representation o= f ReflectionType should be a syntax-valid representation of the type. Witho= ut 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 th= is change, as they currently depend on the string representation of Reflect= ionType 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 shoul= d 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 reflectio= n classes include a getName() method, this seems to have been an oversight. This wasn't an oversight. If we add union or intersection types then not all types are named (for instance `ArrayAccess & Countable & Traversable` is not a named type). This is why it doesn't exist on the base ReflectionType. I have surveyed some of the people who have voted no. Their reasons vary but based on these conversations it seems to me that by dropping ReflectionClassType and the associated autoloading mechanism that overall we'd be happier. I do agree with Aaron that at least *some* changes really need to go into 7.1. How do people feel about my proposal to just drop autoloading and `ReflectionClassType`?