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

Issue Type: Bug Created: 2007-08-20T12:18:33.000+0000 Last Updated: 2008-09-02T10:39:09.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Bill Karwin (bkarwin) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Server_Reflection

Related issues: - ZF-1865



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.


Posted by Bill Karwin (bkarwin) on 2007-08-20T12:19:17.000+0000

Linking to related issue that affects Zend_Db_Table.

Posted by Matthew Weier O'Phinney (matthew) on 2007-11-16T12:14:44.000+0000

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.

Posted by Wil Sinclair (wil) on 2008-04-18T13:12:05.000+0000

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

Posted by Matthew Weier O'Phinney (matthew) on 2008-04-22T10:42:12.000+0000

Scheduling for next minor release.

Posted by Alexander Veremyev (alexander) on 2008-06-17T09:25:27.000+0000


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

That should be the best solution for services.

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:09.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.