-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
feat: adds conditional return types to some global helper functions #1260
Conversation
Could you share your stub and the relevant config lines? |
Here is the stub: https://github.com/enlightn/enlightn/blob/1937be5e6bd3142dfd03de90927ddd571f16477c/stubs/Request.stub And the config lines: https://github.com/enlightn/enlightn/blob/1937be5e6bd3142dfd03de90927ddd571f16477c/phpstan.neon#L19-L20 Note: To add Larastan 2.x support to Enlightn, we needed to specify |
Does it succeed if you overwrite |
@szepeviktor, yes it does. Overwriting the Larastan |
I suggest you to create a 1-class repo with 2 simple stubs and open an issue in @phpstan. |
Sure, thanks. I opened phpstan/phpstan#7461 |
Before running PHPStan: |
Can we not go back to the |
@canvural can tell that. |
@paras-malhotra Have you tried pushing in your custom stubs file by |
No, I haven't tried that yet. I am assuming you mean adding a This code seems to just append the stub files from all extensions, so I'm not sure that would work. |
Hi, Multiple stub file for one class were never supported by PHPStan. So in previous versions your code was working "by accident"
Stubs in Larastan are growing. Using On the other hand maybe we can go back to it if this is implemented. |
Changes
This PR adds conditional return types to some global helper functions. Replaces some of the existing extensions we have.
Breaking changes
n/a