Re:
| From: | Zeev Suraski | Date: | Thu, 11 Sep 2003 07:12:24 +0000 |
| Subject: | Re: | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21383@lists.php.net to get a copy of this message | ||
At 00:20 11/09/2003, Greg Beaver wrote:
Hi, Zeev Suraski wrote: /** * @return unknown * @param $params unknown * @param $smarty unknown * @desc Enter description here... */ I don't know why. It was often demanded. But zend uses to not listenOk, well, the ZDE actually recognizes both "type $varname ..." and "$varname type ...", and as of 3.0.1, it will also recognize just plain "type ...". But what it generates is indeed $varname type. We'll change it for 3.0.1.to the userbase too much. Daniel, Can you explain how it is incompatible? I know that @desc is not in the PHPDoc standard, but how does this break compatibility? A PHPDoc parser should still be able to figure it out, and ignore @desc.phpDocumentor will actually replace the summary description with @desc if it is encountered. No user will also duplicate the short description outside of @desc, that requires valuable keystrokes leading to carpal tunnel ;). The main compatibility problem is the @param tag has a reverse ordering as Stephan pointed out, as in @param varname type instead of @param type [$varname] [description of parameter]
phpDocumentor allows an optional variable name, and an optional description of the parameter, so the variable name has to be prepended with $ to be recognized as a variable name.The ZDE compares the first and second arguments against the list of actual arguments in the function declaration. If it finds a match, it considers it to be the variable name part of the @param argument - with the general mess in various PHP projects using phpdoc-like comments, it appeared to be the only reasonable way :)
I'm happy to work with ZDE people if there are technical demands, it would be very nice if phpDocumentor/ZDE had cross-compatibility.Sounds cool :) I think we should be ok with the new @param syntax. Zeev