-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
[TASK] Port some type annotation improvements from the Core #170
[TASK] Port some type annotation improvements from the Core #170
Conversation
a8b53e4
to
01a9670
Compare
I don't quite understand why PHPStan cannot resolve the type for |
The Core recently has received some improvements on the type annotations/declerations. Port those over to our stubs. Also rearrage some union type to have `null` always last.
01a9670
to
b56227c
Compare
Okay, I've simplified the type a bit for the time being to get this to green. |
@oliverklee I‘m on vacation but I’ll have a look end of next week |
Looks like the previous issue was due to a bug in PHPStan that is not reproducible in the PHPStan playground. Once phpstan has created it's result caches the error is gone. If i remove the result cache i get the error again. Executing phpstan once again is successful. So it is somehow a bug that does only occur if result caches are not active. I'll further investigate and create a phpstan issue once i have a minimal reproducable setup. Maybe it is also somehow related to other parts of this package - I'll investigate and come back soon. |
Ok, reason is phpstan/phpstan#10967 and the text in the orange box: https://phpstan.org/user-guide/stub-files
|
@oliverklee Looks like i'm not allowed to push my changes to your fork so i just made code suggestions. |
@oliverklee Ok i was able to commit them via the GitHub interface. weird... But it should work now as expected. |
@sascha-egerer Looks good, thanks! 🙏 |
The Core recently has received some improvements on the type annotations/declerations. Port those over to our stubs.
Also rearrage some union type to have
null
always last.