ZF-7606: Zend_Reflection_Docblock::__toString() must return a string value


kms > phpunit:

      [php] Evaluating PHP expression: PATH_SEPARATOR
   [delete] Deleting: /home/jkleijn/kmsbuild/kzflib/phpunit/bootstrap.php
   [append] Appending string to /home/jkleijn/kmsbuild/kzflib/phpunit/bootstrap.php
     [exec] Executing command: phpunit    --configuration /var/www/kms/testing/build/projects/kzflib/phpunit/standardConfig.xml    --bootstrap /home/jkleijn/kmsbuild/kzflib/phpunit/bootstrap.php    /home/jkleijn/kmsbuild/kzflib/source/kwd/kzflib/tests/kzflibSuite.php 2>&1
     [exec]      PHPUnit 3.3.17 by Sebastian Bergmann.
     [exec] E
     [exec] Time: 0 seconds
     [exec] There was 1 error:
     [exec] 1) testCanCreateDecorator(kwd_kzflib_tests_DecoratorGeneratorTest)
     [exec] Method Zend_Reflection_Docblock::__toString() must return a string value
     [exec] /home/jkleijn/kmsbuild/kzflib/export/dependencies/52f4c5a5877ea833f105e1b8d9047687/Zend/CodeGenerator/Php/Property.php:68
     [exec] /home/jkleijn/kmsbuild/kzflib/export/dependencies/52f4c5a5877ea833f105e1b8d9047687/Zend/CodeGenerator/Php/Class.php:124
     [exec] /home/jkleijn/kmsbuild/kzflib/export/kwd/kzflib/codegenerator/ProxyGenerator.php:28
     [exec] /home/jkleijn/kmsbuild/kzflib/export/kwd/kzflib/codegenerator/DecoratorGenerator.php:24
     [exec] /home/jkleijn/kmsbuild/kzflib/export/kwd/kzflib/tests/codegenerator/DecoratorGeneratorTest.php:20
            Tests: 1, Assertions: 0, Errors: 1.

This issue exists in the 1.9.0 as well as the 1.9.1 tags.


John Kleijn


Anyone? Well over a month now, two minor releases, no reponses, quick fix..


Hi anyone. It has been two months since I opened this ticket. What do I have to do get it fixed? Submit a patch? If you take 5 minutes of your time to take a look at it you'll find it is pretty trivial.

Many thanks to anyone who can get this fix in a next release.

Fixed in trunk and merged back into 1.9 release branch.

The submitted fix here solves the obvious issue but when I discussed this with Ralph prior to 1.9.3 he suggested that the solution required something in line with the general policy for Reflection::export(). The trouble was at the time that we didn't know what that was...

I guess my question is have we solved that here, or are we just concealing another issue for later? (Ralph did say that he'd inquire of the Reflection maintainer but I never found out if that happened or what the results were if he did.)

Perhaps, but it at least fixes the immediate issue. IMO the whole reflection and codeGenerator packages are in desperate need of some peer review.