ZF-1866: Zend_Server_Reflection should allow specifying docblock parameters for parameters not in the method signature


The class Zend_View_Helper_DeclareVars has a method {{declareVars()}} that reads its parameters with {{func_get_args()}}. The docblock declares a {{@param}} for variable arguments, but the function signature declares no parameters.

This is apparently legitimate coding practice according to example in, but it break Zend_Server_Reflection. {{Zend_Server_Reflection_Function::_refect()}} makes an assumption that if a parameter is documented with a {{@param}} tag in the docblock, then there must be a corresponding parameter declared in the method signature.


Linking to related issue that affects Zend_Db_Table.

I'm re-marking this as a Zend_Server_Reflection bug, and re-titling the summary, as it's not really an issue with DeclareVars so much as with Zend_Server_Reflection not treating docblock params that are unmatched in the method signature as optional parameters.

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Scheduling for next minor release.


Exception is thrown now if number of arguments doesn't correspond number of actual function arguments.

That should be the best solution for services.

Updating for the 1.6.0 release.