Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94395 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39508 invoked from network); 5 Jul 2016 21:06:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jul 2016 21:06:36 -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.220.54 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.220.54 mail-pa0-f54.google.com Received: from [209.85.220.54] ([209.85.220.54:35845] helo=mail-pa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/C2-19446-B512C775 for ; Tue, 05 Jul 2016 17:06:36 -0400 Received: by mail-pa0-f54.google.com with SMTP id uj8so10651701pab.3 for ; Tue, 05 Jul 2016 14:06:35 -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; bh=86PNvpfJ7sCFjbf2z30praQoPE3m1VPF5BFGG2Z//OA=; b=DFrqReZgT02N+WXc9XSGP0zJ3ZiE30N8SoSDVqvx27JSdMlrk0w1sWsyiSAkv76Ksh GDImFJokm4HME3eLhgxYmf15CoVJ4n8tgIBwtTtaOnjAuYSvqQ6nxISv+Gy3fhZPsgQG VHav5aybaMC+ase7DlEkzvsk7E6/HUetHc00ng8g0Y0ZgOnKsPt3ssnYroSXvo1TySv8 NlwAvoFwwrUMwiY131nFIm9r4XwfTFMfQT5NK1MwyIO2CdAhmfcz/QPtUmtY+DlIUT3l NonnkA67RrWQR3p+7LxdBmNcj8vkUV3gIy9Je7urSnMSCd8DYhHOU+QYE2s3crNhlo+0 ybCg== 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; bh=86PNvpfJ7sCFjbf2z30praQoPE3m1VPF5BFGG2Z//OA=; b=NoAiQY0S9W+Nq0/h1CzRdkrbiq1RxyRad4Wk19TItA7++4uskr/Yziq1m3g0ZqZiFT 9bJRg6IdBdR0RfR5wlLn0pn3n+MyqAUoBZQef0d+KUHvJI6TTvXTgqGHgrQMfp9MDrIB IJ7mvCtqXKXkGIYhno4ZNP07M/cIK4K/8Xp4QUW3xX6Qwl3G2+bkvoLXcADpfFQCd6KB 232QBnmQjBIhcbXoB8QhT6A+wTtmRmisgrhGPsPnCKOuJx8w7HzmMrgehgKXzf2LtKM5 KuBtT4BdtVblL+ytyTkhcJRUTTn1vbmC1HksuyMdot/PfCRsYnYRApmPUNVdN3AmKppR MGnw== X-Gm-Message-State: ALyK8tJkTJOCdoSsUCcZw+Kl92jWTNaY9uWYTytgrm1K9gVnYpwBz8PJDWrYqcpgeRLga1SUzwU6HC0L59JuGA== X-Received: by 10.66.220.73 with SMTP id pu9mr35377937pac.77.1467752792415; Tue, 05 Jul 2016 14:06:32 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.66.23.72 with HTTP; Tue, 5 Jul 2016 14:06:31 -0700 (PDT) In-Reply-To: <13e40d6f-c63c-6d0b-db09-7f5805ed018c@gmx.de> References: <1f39f97a-6aaf-8550-9f82-a7e80465f903@telia.com> <13e40d6f-c63c-6d0b-db09-7f5805ed018c@gmx.de> Date: Tue, 5 Jul 2016 15:06:31 -0600 X-Google-Sender-Auth: Rh6EPtTELtBVMmXTNM-Kc81rocs Message-ID: To: Christoph Becker Cc: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= , Nikita Popov , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][Vote] ReflectionType Improvements From: levim@php.net (Levi Morrison) > Another (minor) issue I have with the RFC is the introduction of > ReflectionNamedType. A simpler alternative appears to be to add the > getName() method to ReflectionType; for unnamed types this could simply > return (string) $reflectionType. That might not be the most farsighted > design decision, though. The problem is that if something such as union types or intersection types does pass those types are not named. While the current iteration of union types failed it is possible a future RFC can pass (for the record the vote was 11-18). > To add to this, another issue we discussed OTR but didn't really come to a conclusion on, is the handling of self and parent type hints by ReflectionClassType. The implementation I have will return ReflectionNamedType for self and parent. There isn't any special casing for it. Rather since we forbid defining types with these names they won't exist when the check happens and it will fall back to ReflectionNamedType. As pointed out these cannot always be resolved because of traits so this behavior seems sensible. I think the RFC should be amended to specify this behavior.