We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PHPDoc inline in new anonymous class creation causes Internal Error.
The use-case is adding a @psalm-immutable annotation to an anonymous class extending an immutable class as is described in the psalm documentation: https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-immutable.
@psalm-immutable
/** @psalm-immutable */ abstract class Foo { } new /** @psalm-immutable */ class extends Foo { };
Using the --debug option prints:
PHP Fatal error: Uncaught PHPStan\ShouldNotHappenException: Internal error. in phar:///application/vendor/phpstan/phpstan/phpstan/src/Rules/Generics/ClassTemplateTypeRule.php:36
https://phpstan.org/r/6a77347f-d037-4793-a23a-a477f4b110c7
No errors!
The text was updated successfully, but these errors were encountered:
Fixed by phpstan/phpstan-src#283 + phpstan/phpstan-src@643646a
Sorry, something went wrong.
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.
Successfully merging a pull request may close this issue.
Bug report
PHPDoc inline in new anonymous class creation causes Internal Error.
The use-case is adding a
@psalm-immutable
annotation to an anonymous class extending an immutable class as is described in the psalm documentation: https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-immutable.Using the --debug option prints:
Code snippet that reproduces the problem
https://phpstan.org/r/6a77347f-d037-4793-a23a-a477f4b110c7
Expected output
No errors!
The text was updated successfully, but these errors were encountered: