ZF-7884: testFromReflection_GetWithNativeType(Zend_CodeGenerator_Php_ParameterTest)

Issue Type: Unit Tests: Problem Created: 2009-09-18T06:57:00.000+0000 Last Updated: 2009-09-18T11:17:28.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: Alexander Veremyev (alexander) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_CodeGenerator

Related issues: - ZF-7886



{panel} 2) testFromReflection_GetWithNativeType(Zend_CodeGenerator_Php_ParameterTest) Failed asserting that is not equal to . {panel}


Posted by Benjamin Eberlei (beberlei) on 2009-09-18T07:10:01.000+0000

This is related to a commit r18073 for ticket ZF-7227

Posted by Benjamin Eberlei (beberlei) on 2009-09-18T07:25:18.000+0000

Found the issue Zend_CodeGenerator_Php_Parameter falsely assumes that the DocBlock Type is the actual type which should be hinted at. This two parts have to be seperated, since PHP only supports hints for array and PHP classes.

Furthermore currently the docblock type has higher precedence than the actual type-hint and it might be that actual type hints are generated from the docblock into the parameter although they have not been present before:

  1. Load Class Foo with a Docblock Hint for a Parameter $foo being stdClass
  2. Do a load from reflection in code generator
  3. regenerate from code-generator should have exactly the same result

I think this currently does not work!

Posted by Benjamin Eberlei (beberlei) on 2009-09-18T11:17:28.000+0000

Fixed with commit r18258 and r18259

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.