phpdox
phpdox copied to clipboard
Support for iterable type
I ran phpdox for a Symfony 4.3 project, got an error for src/Kernel.php, "Unexpected return type definition PhpParser\Node\Identifier [UnitCollectingVisitor.php:299]".
Symfony 4.3 uses strict return types now. Only suspicious return type on the file was 'iterable'. Seems like phpdox's UnitCollectingVisitor->processMethodReturnType()
doesn't handle the 'iterable' types.
PHP Manual for Iterable type
I may have run into the same issue, certainly a similar one, on the same line in UnitCollectingVisitor.php
.
$ git clone [email protected]:sebastianbergmann/phpunit.git
$ cd phpunit
$ ant generate-project-documentation
.
.
.
[phpdox] [08.07.2019 - 08:35:20] The following file(s) had errors during processing and were excluded:
[phpdox] [08.07.2019 - 08:35:20] - ../src/Framework/MockObject/Generator.php (Unexpected return type definition PhpParser\Node\Identifier [UnitCollectingVisitor.php:299])
[phpdox] [08.07.2019 - 08:35:20] - ../src/Framework/MockObject/Invocation.php (Unexpected return type definition PhpParser\Node\Identifier [UnitCollectingVisitor.php:299])
.
.
.
Can you try with master
?
I run a quick test with master
and release 0.12.0
, on master
I don't have the issue, but I have it on 0.12.0