theseer / phpdox

Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)
http://phpdox.de
Other
600 stars 121 forks source link

Support for iterable type #366

Open potasiyam opened 5 years ago

potasiyam commented 5 years ago

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

sebastianbergmann commented 5 years ago

I may have run into the same issue, certainly a similar one, on the same line in UnitCollectingVisitor.php.

$ git clone git@github.com: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])
.
.
.
MacFJA commented 5 years ago

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