Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49667 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15052 invoked from network); 15 Sep 2010 09:46:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2010 09:46:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=lars.schultz@toolpark.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lars.schultz@toolpark.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain toolpark.com from 195.49.42.12 cause and error) X-PHP-List-Original-Sender: lars.schultz@toolpark.com X-Host-Fingerprint: 195.49.42.12 mail1.screenlight.ch Received: from [195.49.42.12] ([195.49.42.12:61978] helo=mail1.screenlight.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/31-33442-9D5909C4 for ; Wed, 15 Sep 2010 05:46:05 -0400 Received: from [192.168.1.112] ([192.168.1.112]) (authenticated user lars.schultz@toolpark.com) by mail1.screenlight.ch (Kerio Connect 7.0.2 patch 1) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for internals@lists.php.net; Wed, 15 Sep 2010 11:45:58 +0200 Message-ID: <4C9095D5.1050206@toolpark.com> Date: Wed, 15 Sep 2010 11:45:57 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.9) Gecko/20100825 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: internals@lists.php.net References: <39505F13-655A-43AF-941E-77750B7F7201@gmail.com> <001601cb543a$d81ebac0$885c3040$@com> <4C8FC695.2060800@sugarcrm.com> <4C8FD72B.1070108@sugarcrm.com> <4C906333.4030204@sugarcrm.com> <7.0.1.0.2.20100915085504.17eab4d8@zend.com> <12617cf66ae07d7a2fd79a293ed69b85@beberlei.de> In-Reply-To: <12617cf66ae07d7a2fd79a293ed69b85@beberlei.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch From: lars.schultz@toolpark.com (Lars Schultz) listen to this man;) I think he's on to something. I don't see any problem with that aproach and both parties would be satisfied, no? Am 15.09.2010 10:45, schrieb Benjamin Eberlei: > > Hi Zeev and Stas, > > > > I wouldnt mind extending doc block metadata support instead of adding a > > new syntax. > > > > I agree with you that PHP Docs allow metadata and they can be used for > > that (and some people do, including me), however what the annotation patch > > + rfc tries to achieve is something going beyong $refl->getDocComment() > > returning a string only. The string only return leads to hunderets of > > different approaches for annotating metadata in all the different > > frameworks and libraries. A single unified syntax would be benefitial. > > > > That is why I don't know if it will even be possible to extend the doc > > blocks in a generic way that does not break half the applications out > > there. > > > > When extending doc-blocks there is probably new method required > > $refl->getParsedDocComment() which then returns an array of metadata for > > that particular refl instance. Now here the syntax would be a problem, can > > we find something that does not break for all the different usages of > > docblocks out there? Since the method/parsing would be nested, on request > > only it wouldnt break any application that does not use parsed doc > > comments. However for applications that do, a syntax needs to be found > > that: > > > > 1. does not break for various type hinting doc syntaxes > > 2. does not break for various commenting styles > > > > Can someone come up with additional pitfalls? > > > > greetings, > > Benjamin > > > > On Wed, 15 Sep 2010 08:55:55 +0200, Zeev Suraski wrote: > > > > At 08:09 15/09/2010, Stas Malyshev wrote: > > > > Phpdocs aren't "user documentation" only, not for a long time (I > > mean the concept, not the particular application called phpDocumentor, of > > course). They are being used as metadata in many places. You could argue > > that's misguided but you can't ignore the fact that's what people do. The > > "goals and usages" of those tags are exactly metadata - and regardless of > > the annotations, I'd be happy if Reflection recognized it finally (by > > integrating some kind of phpdoc tag parser). > > > > I second that word for word. FWIW, I don't see it as misguided at all. > > Zeev >