-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Error with PHP8 and __toString for Symfony project when use DoctrineBehaviors translation on entities #5497
Comments
This bug report is missing a link to reproduction on phpstan.org. It will most likely be closed after manual review. |
Thank you |
After testing, it turns out that it does not work.
|
Hi, this is not a PHPStan bug. Looks like the extension is saying that |
I'm not sure. $reflectionClass = $broker->getClass($translatableClass)
->getNativeReflection(); with $translatableClass = 'Article'; $reflectionClass
->getMethod('getTranslationEntityClass')
->invoke(null); should return
|
@RomulusED69 Fixed that too :) ondrejmirtes/BetterReflection@f14002e + phpstan/phpstan-src@9b51f82 |
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
Hi ✋,
I have a Symfony project with https://github.com/KnpLabs/DoctrineBehaviors.
I tried to update project to PHP8 but I'm having problem with phpstan.
Bundle created its own extensions https://github.com/KnpLabs/DoctrineBehaviors/tree/master/utils/phpstan-behaviors/src/Type
No problem with PHP7.4 but with PHP8:
After investigations, problem occurs only when method
__toString
is defined.Problem appears on
invoke
here https://github.com/KnpLabs/DoctrineBehaviors/blob/master/utils/phpstan-behaviors/src/Type/TranslationTypeHelper.php#L36Code snippet that reproduces the problem
https://github.com/RomulusED69/phpstan-knp-doctrine-behaviors-bug
Thanks for your help
The text was updated successfully, but these errors were encountered: