ZF-7349: Zend_Reflection_File does not reflect interfaces. Zend_CodeGenerator cannot generate interfaces.

Description

The tokenizer in Zend_Reflection_File ignores T_INTERFACE so it is not possible to reflect interfaces within files at the moment. Zend_Reflection_Class inherits ReflectionClass thus it should be possible to reflect interfaces.

Zend_CodeGenerator_Php_Class assumes that Zend_Reflection_Class is always a class. So it is not possible to generate an interface.

Comments

Fixed in r17426 in trunk

Your fix for Zend_Reflection_File is fine.

The other part of the issue concerning Zend_CodeGenerator_Class seems to be still existing. Shall I open another issue for that?

The problem is that Zend_CodeGenerator assumes that Zend_Reflection_Class is always a class not an interface. If you try to generate an interface with Zend_CodeGenerator_File parsed via Zend_Reflection_File you will encounter some problems.

Zend_CodeGenerator_File::fromReflection() does not set the filename. I think



following the line with 

will fix that.