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

Process generator produces mixeds instead of strings #413

Closed
rudiedirkx opened this issue Oct 29, 2024 · 2 comments
Closed

Process generator produces mixeds instead of strings #413

rudiedirkx opened this issue Oct 29, 2024 · 2 comments

Comments

@rudiedirkx
Copy link

rudiedirkx commented Oct 29, 2024

  • 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?

@ondrejmirtes
Copy link
Member

This should fix it: 270c2ee

Please try it out in the latest 1.4.11 release.

Copy link

github-actions bot commented Dec 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants