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

Issue Type: Improvement Created: 2009-07-22T06:29:02.000+0000 Last Updated: 2009-08-12T10:25:20.000+0000 Status: Resolved Fix version(s): - 1.9.1 (11/Aug/09)

Reporter: RĂ¼diger Krieg (dbc_rkrieg) Assignee: Ralph Schindler (ralph) Tags: - Zend_CodeGenerator

  • Zend_Reflection

Related issues: Attachments:


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.


Posted by Ralph Schindler (ralph) on 2009-08-07T08:54:22.000+0000

Fixed in r17426 in trunk

Posted by RĂ¼diger Krieg (dbc_rkrieg) on 2009-08-07T09:37:23.000+0000

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

<pre class="highlight">

following the line with 

will fix that.

Have you found an issue?

See the Overview section for more details.


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

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