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 <z...@zend.com> 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 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to