Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for iterable type #366

Open
potasiyam opened this issue Jun 12, 2019 · 2 comments
Open

Support for iterable type #366

potasiyam opened this issue Jun 12, 2019 · 2 comments

Comments

@potasiyam
Copy link

potasiyam commented Jun 12, 2019

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
Copy link
Contributor

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
Copy link
Contributor

MacFJA commented Jul 24, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants