Issues

ZF-7884: testFromReflection_GetWithNativeType(Zend_CodeGenerator_Php_ParameterTest)

Description

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

Comments

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

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!

Fixed with commit r18258 and r18259