Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93872 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68096 invoked from network); 10 Jun 2016 14:50:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2016 14:50:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.172 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.192.172 mail-pf0-f172.google.com Received: from [209.85.192.172] ([209.85.192.172:35321] helo=mail-pf0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/93-50092-4A3DA575 for ; Fri, 10 Jun 2016 10:50:12 -0400 Received: by mail-pf0-f172.google.com with SMTP id c2so24305837pfa.2 for ; Fri, 10 Jun 2016 07:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=qJkQKomEmmlBIOOu5gsCEs08WmZADy2TfB2xNIBqynQ=; b=etV9dOQHyPde+nGXfL7icuMSzQrlKG8xUOsSr1ld7ITNn9rSotoKYeoGLgfomSqFzg z0sojpHoIFrW7hBNjMlDftD6OG9MwzSR5AEdQ3RGYCeQ5Y/b41nUttv2RxYzTtOEyvc/ 5JFNmbg/4vhLoBBXNx5J5ZKyGWBnL+gZsv75dIfc1wcQcV6Jz47oWQHeesXDVL2kMz3z ljfOtau1CXobRMYltdFkGyG3nhL+PAtmTgP3YMJRA/W2E+jUp2uA8gqdIZ+6ym8TTHRf CQ+PkxV5bA8EfFdv8hAcxRfm6vI3mdUtQgwtIfdR2TGqUO5MqKu7+23uUeuFVxO9BFIx YhEA== 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:from:date:message-id:subject :to; bh=qJkQKomEmmlBIOOu5gsCEs08WmZADy2TfB2xNIBqynQ=; b=QcmPILYQ5fhd83BPFU/Lv/IFsH+BVhA1dSAqB3HNNTOHAgcL8PbjCW9AKs/Wh7pS+2 BsmLKsW0XvUC8U+qxmKqehxNK5xQkMQu/xmgvjowhzKXpk913y6zV7DBB0Ik5NY9khUj Phkix3FmYTGC0YtMWZIZj3YH4VIPwOeBfTLwI4fYwyQJjwgZOYPq6lL0qgwuUoW9rgS7 gR0bjYvjb2W4FwEfi6Zivgm93zaW2NrXhbgMdryBeyAHZ0JHDzX6YoG9SBdCoJNCrfne 6PL3K1dr5AghI+r8Ks79w7X4L5G8OmCb0ZWMaXBrdv11ApheNnZReR2E+jtxre1ENOqY szpw== X-Gm-Message-State: ALyK8tIdmPCj7VhLUmFiuo1Pu7S5wto4yqIiRqkv5l/wHkbUVfP5pzpb/LwQ7IxuODtKlNIshltkiV/yHYxUEA== X-Received: by 10.98.10.137 with SMTP id 9mr2713252pfk.28.1465570209560; Fri, 10 Jun 2016 07:50:09 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.66.236.137 with HTTP; Fri, 10 Jun 2016 07:50:09 -0700 (PDT) Date: Fri, 10 Jun 2016 08:50:09 -0600 X-Google-Sender-Auth: nfz0k1fGEZrlOeJRGgDZtegD_Bg Message-ID: To: internals Content-Type: text/plain; charset=UTF-8 Subject: ReflectionType improvements From: levim@php.net (Levi Morrison) Now that the mailing list is working again I'd like to propose some improvements to the ReflectionType API. We added ReflectionType as part of the Return Types RFC. At that time the API was intentionally kept minimal to not step on the toes of potential future features (such as enum, union and intersection types) with the intention of fleshing it out later. As long as the release managers for 7.1 are okay with it I'd like to do these improvements now. Shall I move forward with an RFC or do you consider this too late? The proposed API looks like this: https://gist.github.com/morrisonlevi/5819a2b8d86561849ee916a7bcbc9c29. Notably a `ReflectionClassType` will be returned if possible which has a `getClass(): ReflectionClass` method. This has been a commonly requested addition and simplifies a common use-case. I tried to discuss these changes on Reddit to gauge community impact but it had few responses: https://www.reddit.com/r/PHP/comments/4m93s1/i_want_to_enhance_and_break_the_reflectiontype/.