-
-
Notifications
You must be signed in to change notification settings - Fork 921
Internal error: Failed to retrieve the reflection object (PHP 8.1 RC) #5954
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
Comments
This bug report is missing a link to reproduction on phpstan.org. It will most likely be closed after manual review. |
Hi, I need a small reproducing repository to understand what's going on. |
Hi, as I found the same bug, I've created a small repo useful to reproduce it: |
Thanks @edubacco - I was having trouble boiling down my original issue into a reproduce case, glad you were able to find one! |
hi all. I have laravel 8, php8.1 rc5. |
This is definitely PHP 8.1 bug (can you reproduce that on PHP 8.0 or not?), it's a matter of isolating that to a small piece of PHP code and reporting that to https://bugs.php.net/. |
The phpstun problem appeared only after switching to php 8.1 |
But I'm not surprised. |
I wasn't able to reproduce this with a simple PHP script, but the crashing code in question is supposed to fix a different PHP bug that should no longer happen on PHP 8.0+, so I just wrote an if statement around it: phpstan/phpstan-src@6573959 |
Please test PHPStan's dev-master to see if it fixes your problem. |
@ondrejmirtes |
if I'm off in class "use FilterTrait" - phpstan works great!
Any inclusion of a trait in any class - breaks phpstan |
Reported in PHP: https://bugs.php.net/bug.php?id=81630 |
Fixed: php/php-src@6641e3b |
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
PHPStan 1.1.1 on PHP 8.1-RC5 (Docker,
php:8.1.0RC5-fpm-alpine3.13
) crashes:Internal error: Internal error: Internal error: Failed to retrieve the reflection object in file /var/www/html/src/Endpoints/Generated/GeneratedMutationRemoveAliasFromConnectedNode.php
Stack trace:
Code snippet that reproduces the problem
File from error:
I can provide the trait in question if it's relevant, but my guess is the problem is around the aliased trait method import.
Expected output
No error/no crash. This analyzes and runs fine in 8.0.
The text was updated successfully, but these errors were encountered: