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
PHP 8.1 - Intersection type issue #5870
Comments
This bug report is missing a link to reproduction on phpstan.org. It will most likely be closed after manual review. |
Hi, PHPStan 1.0 runs on PHP 8.1 runtime in the sense there are no deprecations, all tests pass, and the current feature set works as expected. But it doesn't yet support all new PHP 8.1 features. Full PHP 8.1 is coming later this year. (It's a lot of work.) |
Maybe I can help with the PR to add support for this. I'll take a look at the phpstan-src and see if I can get started during the next days |
Hi, it's a massive amount of work I think I have to do it myself. First step is to base this https://github.com/ondrejmirtes/BetterReflection fork off of upcoming Roave/BetterReflection 5.0.0 and check that everything works as expected. |
I see. Indeed, I may not have the right knowledge to orchestrate that. |
Implemented: phpstan/phpstan-src@be05557 |
Awesome! Thank you @ondrejmirtes :) |
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. |
Bug report
Code snippet that reproduces the problem
Reproducible in phpstan.org: https://phpstan.org/r/992affc0-b12c-4f63-84ea-eabb87a8f42b
Expected output
The expectation would be that this expression would be valid as intersection type, but from the stack trace, it seems it's passing it into a place expecting an union type instead.
Did PHPStan help you today? Did it make you happy in any way?
I'm very happy with the release of the 1.0 version, and I'm testing it in PHP 8.1 :)
Configuration:
Stack trace
The text was updated successfully, but these errors were encountered: