phpdox icon indicating copy to clipboard operation
phpdox copied to clipboard

Support for iterable type

Open potasiyam opened this issue 5 years ago • 2 comments

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

potasiyam avatar Jun 12 '19 09:06 potasiyam

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])
.
.
.

sebastianbergmann avatar Jul 08 '19 08:07 sebastianbergmann

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

MacFJA avatar Jul 24 '19 12:07 MacFJA