Issues

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

Set component and auto reassign

on it!

Fixed and merged into 1.9 release branch.