[TYPO3-mvc] RFC: Throw exception if action methods have no docblock

Andreas Wolf typo3ml at andreaswolf.info
Tue May 25 17:15:41 CEST 2010


Hi,

Felix Oertel schrieb:
> On 2010-05-24 21:38:19 +0200, Andreas Wolf said:
>> Nevertheless Extbase did not recognize them - just because I did start 
>> the block with /* instead of /**. Eclipse showed the block as a 
>> perfectly valid docblock
> 
> erm, so what? kind of hard to say, but does it matter what some random 
> IDE says? *g* a valid docblock starts with /**

well, Eclipse is maybe not some random IDE - as far as I can tell, most 
IDEs don't differ between /* and /** for DocBlocks. At least gedit 
(GNOME) and Eclipse don't do it. TextMate and Kate (KDE) on the other 
hand do it.

So, maybe we could introduce some warnings, or a check script for 
finding these errors. Or have a warning in the docs, which would be 
least hassle but may prevent one or the other dev from some hours 
wast^Hspent on debugging.


>> My proposal is to throw an exception if no docblock is given for 
>> action methods.
> 
> why should we do that? half of my action methods don't need and with 
> that in mind don't have a docblock.

Hm, for auto-generating an API doc docblocks are kind of neccessary. But 
I agree that this should not be forced.


>> This would prevent such errors, and for argument validation we need a 
>> docblock anyways. What is your opinion?
> 
> as mentioned above: we can hardly force the user to use docblocks if 
> does not want/have to ;)

Agreed. But I'm not that deep inside the validation thingy of Extbase - 
do we need type hints for the parameters inside the docblock, or is it 
enough to have the object types with the parameter declaration?


Regards

Andreas


More information about the TYPO3-project-typo3v4mvc mailing list