Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101307 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23572 invoked from network); 11 Dec 2017 07:51:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Dec 2017 07:51:37 -0000 Authentication-Results: pb1.pair.com header.from=andreas@dqxtech.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andreas@dqxtech.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dqxtech.net from 209.85.215.49 cause and error) X-PHP-List-Original-Sender: andreas@dqxtech.net X-Host-Fingerprint: 209.85.215.49 mail-lf0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:36086] helo=mail-lf0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/87-53433-7093E2A5 for ; Mon, 11 Dec 2017 02:51:36 -0500 Received: by mail-lf0-f49.google.com with SMTP id f20so18089955lfe.3 for ; Sun, 10 Dec 2017 23:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dqxtech-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Tf2Sl67prncfg+HBHvTLEoz+eqvGR/IZYua3CQmYJxA=; b=huCF8oMyP6HjTidMzUzfuOvG6LBtRBwK7PPML99SZUDpKRLaJ28DCpFp8x7C4Lt0pc fGx+l5uiDJmA0JDdKEZuhaTxrpw7fPHvAHJAzZ8xbSfVesgGI7aCkxaJQ8UbAiqv85HC RFpA0lUnHH5gxeUABgeq01DUzJE8Q/vodgPEZkoA+5lFvtNA2mvGVf2v5vlXt/J/Ed9k 391CJo80bWh6IDB0oIBGFCI9DZzjqmPO2NEGdEsEyOufoWSzeS8YZIPg3nITq8EDS7HY BrTE7j2zyEQWxmu1XufuDmuR5zfmpNEsekJFdOIw7Qj7EBDD2Qf5mEDIGiJ1Xq0RCZGt sjpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Tf2Sl67prncfg+HBHvTLEoz+eqvGR/IZYua3CQmYJxA=; b=Fu9Oy7JS6CUJLcF7l5rOhA3VzL6JsP+5zOJOQrEKasYC/nyxHklVTxVortH4tgVUF1 neiWwJQnWQiBltfvpJK7DaZp8auYfjManf/07adRqWn9h2bmrQLtl6DdEUcPYCBppuk9 gAUsoex+to3kvHDtEXXdCCgHw5Nz9ODCQB4vb/W4GcORsUNdrR32yicovqKkqqojy5Wz +fq1xrXVSGDDWmlvMhqU0UgvnkCRCGs5BShXL8Culm+24uUtSP+Li3dNVNn39jrqDiHE Q2DFRFsSLvunI/lpCpLItmBS+5i3AidzucXIKWm83KUw36BUdplRPtPPQUAwwwpkP3X/ 8uig== X-Gm-Message-State: AKGB3mJCdnzQpeyd6c9VMJo166c9snYA7PNdr3dwim2jihz/cdXV4CK6 o6fS//Qt9perwhyn+kx8HjKzmoLG X-Google-Smtp-Source: ACJfBosQllbFswtNYyz+LeZmuRFIVgB3Xfk2KaODl4yrND+qmkVC6oCvA85V+nwumnsN/OhWzDZBgQ== X-Received: by 10.46.117.23 with SMTP id q23mr1883162ljc.85.1512978691386; Sun, 10 Dec 2017 23:51:31 -0800 (PST) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com. [209.85.215.42]) by smtp.googlemail.com with ESMTPSA id 1sm2698799ljt.35.2017.12.10.23.51.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Dec 2017 23:51:30 -0800 (PST) Received: by mail-lf0-f42.google.com with SMTP id 74so18101966lfs.0 for ; Sun, 10 Dec 2017 23:51:30 -0800 (PST) X-Received: by 10.46.101.74 with SMTP id z71mr20297799ljb.35.1512978690118; Sun, 10 Dec 2017 23:51:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.170.16 with HTTP; Sun, 10 Dec 2017 23:51:09 -0800 (PST) In-Reply-To: References: Date: Mon, 11 Dec 2017 08:51:09 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Niklas Keller Cc: PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] ReflectionContext for imports and namespace From: andreas@dqxtech.net (Andreas Hennings) > > Documentation tools shouldn't run the code IMO, that means they won't have > access to that feature. By "documentation tools" do you mean libraries like phpDocumentor? You are right, those need to parse anyway, they cannot use reflection API. But tools for annotation discovery may want to use native reflection instead of parsing, it is an implementation choice. > > Nikic's PHP parser already contains a tool that resolves all namespaces, you > can probably write a similar visitor for the Ast that also works for PHPdoc > blocks. > > Regards, Niklas On 11 December 2017 at 08:46, Marco Pivetta wrote: > Indeed that already exists at > https://github.com/Roave/BetterReflection/blob/2.0.1/docs/features.md#analysing-types-from-docblocks > - relatively new lib, so it probably didn't get noticed upfront in here. Yes, parser / userland solutions exist for this purpose. (I have seen BetterReflection) I just thought since this information is already available, a library that uses reflection API should not need a userland parser to get it.