What about a nice documentation of our code ? (asked many times by users)
I propose we establish rules of functions comments, in order to be able to use http://www.phpdoc.org
First step would be to clean all functions and classes of Piwigo with a compatible comments syntax (see http://www.phpdoc.org/docs/latest/for-u … rence.html)
Perhaps we can share the work...
Next install PHPdoc on Piwigo.org server and perhaps create a template matching Piwigo colors.
If we decide to start that doc, all developpers must respect the coding syntax when modifying or adding functions.
About functions modification, I think it would be interesting in the description of a parameter, in witch version of Piwigo it was added (using markdown to highlight it). And obviously add the @since tag for new functions.
What do you think ? Is it doable for 2.6 ?
Offline
Hi
very good request
I've made one similar too
That would interest dev of extensions and so attract dev
Offline
Many functions are already have a DocBlock, for example:
/** * creates directory if not exists; ensures that directory is writable * @param: * string $dir * int $flags combination of MKGETDIR_xxx * @return bool false on error else true */ function mkgetdir($dir, $flags=MKGETDIR_DEFAULT)
or
/** * Redirects to the given URL (HTML method) * * Note : once this function called, the execution doesn't go further * (presence of an exit() instruction. * * @param string $url * @param string $title_msg * @param integer $refreh_time * @return void */ function redirect_html( $url , $msg = '', $refresh_time = 0)
so I think it would be good to make this documentation officially requested.
mistic wrote:
Is it doable for 2.6 ?
I don't think we can say "let's make the whole code comply with phpDocumentor for 2.6". But we can say that from now we respect the syntax for new functions/classes and that we progressively add/convert docBlocks.
mistic wrote:
interesting in the description of a parameter, in witch version of Piwigo it was added
Not always easy to know (a change in the line endings will break investigation in SVN history)
mistic wrote:
add the @since tag for new functions.
Yes! easy and very useful.
Offline
plg wrote:
mistic wrote:
interesting in the description of a parameter, in witch version of Piwigo it was added
Not always easy to know (a change in the line endings will break investigation in SVN history)
I'm not talking about something retroactive, it can be done for some parameters if devs remember, but otherwise it's impossible (or someone must explore all commits and check each function individually :-) )
Offline
I don't know how PHPDoc is flexible, does he understand various syntaxes from scratch or must the syntax be exactly as described in their doc ? (it's an open question, I don't expect an answer ^^)
Offline