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
Call to an undefined method Generator::throw() #3418
Comments
@ondrejmirtes Do you have some idea where the problem might be? I'd like to send a PR if you can give me an advice. It seems to have only broken in the last version. |
The method is missing in phpstorm-stubs. There needs to be a patch generated by The Generator stub is in |
Actually the method IS in the stubs. Just prefixed for whatever reason. But then again it has always been like that and it worked so I have no idea why it wouldn't now. |
Linking JetBrains/phpstorm-stubs#822 |
So what now? Do you have an idea why it worked before? |
We need to fix it in https://github.com/ondrejmirtes/BetterReflection/blob/master/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php by remoing the prefix. It worked before because we didn't rely on the stubs but on actual PHP reflection. But we started relying on the stubs for good reasons, like #2883 #3176 #2840 |
Fixed in ClassBlacklistReflectionProvider by using runtime reflection before this is sorted out in BetterReflection: phpstan/phpstan-src@f8512a7 |
@ondrejmirtes This issue reappeared in PHPStan 0.12.33. What's the problem this time? |
Fixed: phpstan/phpstan-src@153c874 |
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. |
https://phpstan.org/r/07da6cd6-ff1d-4464-b7b7-6431b4360e6e
The text was updated successfully, but these errors were encountered: