Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64707 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5623 invoked from network); 8 Jan 2013 22:43:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2013 22:43:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=g.b.yahav@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=g.b.yahav@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: g.b.yahav@gmail.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:45079] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/87-16636-4F0ACE05 for ; Tue, 08 Jan 2013 17:43:00 -0500 Received: by mail-ob0-f173.google.com with SMTP id xn12so1462019obc.18 for ; Tue, 08 Jan 2013 14:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=a5KOMgaAWJbW0fzY/DCLzsfrCaSROFn3xiMGZ4Eb6ck=; b=vPituTyBx+ijLnPbG6H46UJqX6gPnkVSgWIMIH0RhgWXZITMtb6XDSyapWFj1ozAJa 3eSQIO+P2cUbuzZyNeDqTgKSUG7Px27yv903LvIFPurUKOEbf/TbDwcfcLyF61wnQtSy vkH4wAhwAOvdK+oHyG9nzvSKXBkaxYWvzNmywcmgyjOdkEqQ83Qbd7gwUENKcCwbFoh8 zEsdCpdEeTdsCc9JlCndJD4ub34Brr9uXA0Ljz6mNL2HgycvzHhKsgJsTuUmJDvrzzj4 9q4WY1GT0thQ1MOz7DkWSPgfKHM7W6dqBpabsOwtX13/mAeKPRCzsvHejj8cpyuRpSJv I2oQ== Received: by 10.182.42.97 with SMTP id n1mr46100269obl.91.1357684976882; Tue, 08 Jan 2013 14:42:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.151.4 with HTTP; Tue, 8 Jan 2013 14:42:36 -0800 (PST) In-Reply-To: References: <50EBDEEE.8070605@sugarcrm.com> <50EC6569.6030202@sugarcrm.com> <50EC917C.3070805@sugarcrm.com> Date: Wed, 9 Jan 2013 00:42:36 +0200 Message-ID: To: Rafael Dohms Cc: Stas Malyshev , Pierre Joye , Pierrick Charron , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=14dae93998ebc395b904d2ceaab9 Subject: Re: [PHP-DEV] [RFC] Reflection annotations reader From: g.b.yahav@gmail.com (Yahav Gindi Bar) --14dae93998ebc395b904d2ceaab9 Content-Type: text/plain; charset=ISO-8859-1 > If I read this thread correctly then almost everyone agrees that PHPUnit, > Symfony, ZF, Doctrine, etc, all use annotations in the DocBlock because > there > is no available alternative that enables them to use annotations. > Yes, I understood that too. As far as I am concerned I'd separate this topic into a DocBlock parser (that might take into account the current state of affairs with DocBlock Annotations) and actual Annotation support. I agree. I disagree with the above, documentation generators are _unable_ to use the > Reflection library of PHP due to issues with Dynamic Reflection and the > processing of a large amount of files (report on request) with it. > > To phpDocumentor and related projects it would be imperative that a > DocBlock parser is available without having to use the Reflection > extension. > Even so, I think that a pointer to that function should be present in the Reflection, so even if we got SPL parser, one could access it using Reflection since it's the obvious way he/she would look for that. On Tue, Jan 8, 2013 at 11:51 PM, Rafael Dohms wrote: > On Tue, Jan 8, 2013 at 10:37 PM, Stas Malyshev >wrote: > > > Hi! > > > > > Everyone I talked to who implemented annotations in docblocks did it > > > as hack because there is no native support. This is not something that > > > belongs to docblocks. It would be nice if you could take a look at the > > > c# doc, there are really good concepts there. > > > > I know why they did it, and we already discussed that stuff in the last > > annotation discussion. What I mean here is that presenting it as if the > > notion of meaningful comments is completely unheard of in PHP and nobody > > expects it is just wrong. Maybe it was so years ago, but it is > > definitely not true now - de-facto meaningful comments *are* the > > standard now, and have a lot of use, and nobody with any experience is > > surprised by them. Regardless of *why* is it so, it is a fact. > > > > Stas, > > That still does not make it the right place. Annotations went into > docblocks > because it was the only place reflection could provide the needed > information at > runtime. Just because we now treat docblocks as 1st class citizens does not > mean annotations should be there. > > Does that mean that annotations should be in docblocks and not in core > for the reason of "we all know docblocks exist". I would seriously expect > at the very least a stronger reason. These were some of the ones i heard > before: > > 1. The syntax is crap: this is solvable, let's find the right syntax > 2. PHP does not need it: i think we have proven the use already, every > major FW has a > implementation of this, there is clearly demand. > > So if we are going to get anywhere with this discussion I suggest getting > back to > the original RFC and working on solving the issues instead of discussing > developer folklore. > > -- > Rafael Dohms > PHP Evangelist and Community Leader > http://doh.ms > http://wwwamsterdamphp.nl > I, too, think that we should re-consider using Annotation. This feature proved itself as usable My opinion is that we should separate this discussion into two fields which will get their own RFC: - We should recreate / reconsider the Annotation feature. It proved itself as something that developers wish to get, and they mix between abilities (the ability to write documentation in userland) just to achieve that because we didn't provided that. - A doc-block parser (in SPL, core or whatever) that can analyze the doc-comment and separate it. I think that we should still implement this even if we'll have Annotation because this is a usable feature in PHP that can give information for writing API's and such. However, in case Annotations will be implemented - I understand that you may say that my argument is weak. --14dae93998ebc395b904d2ceaab9--