ZF-7909: Zend_CodeGenerator_Php_Class::fromReflection doesn't handle interfaces correctly
Description
The fromReflection method tries to set the implemented interfaces on the new instance directly from the reflection's getInterfaces() method. However the setImplementedInterfaces() method expects an array of strings, and Zend_Reflection_Class::getInterfaces() returns an array of Zend_Reflection_Class.
Also, the array_diff for discarding interfaces implemented by the parent class is the wrong way round. It should be array_diff($reflectionClass..., $parentClass...)
Suggest the changes supplied in the attached patch
Comments
Posted by Satoru Yoshida (satoruyoshida) on 2009-09-23T18:40:11.000+0000
Set component and auto reassign
Posted by Benjamin Eberlei (beberlei) on 2009-09-24T13:19:41.000+0000
on it!
Posted by Benjamin Eberlei (beberlei) on 2009-09-24T13:50:26.000+0000
Fixed and merged into 1.9 release branch.