phpstan/phpstan-symfony

Process generator produces mixeds instead of strings

rudiedirkx opened this issue · 2 comments

  • symfony/process: v6.4.12
  • phpstan/phpstan: 1.12.6

With Process.stub intact:

foreach ( $process as $type => $buffer ) {
	\PHPStan\dumpType($type); // mixed
	\PHPStan\dumpType($buffer); // mixed
}

Same for $process->getIterator().

If I change the class name in the stub, so it doesn't do anything, both $type and $buffer are string.

Maybe because symfony's Process already does correct annotations? In the class phpdoc and getIterator() phpdoc.

I'm okay with a local hack. How do I fix my Process generator?

This should fix it: 270c2ee

Please try it out in the latest 1.4.11 release.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.