-
-
Notifications
You must be signed in to change notification settings - Fork 895
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
Processor with Symfony : Parameter $context of method use Laravel Illuminate type #6890
Comments
I think that Any ideas @soyuka for documenting |
That's hardly an api platform problem IMO...can't you just add a @phpstan-ignore to your ActionStateProcessor.php or something? |
Yes I can, but we shouldn't have to cover up a problem I didn't create... And I didn't specify it in my first message but it is valid for ALL processors. |
I don't see an easy way to prevent this on the api platform side though, and it's not an actual problem IMO. If that's that much of a bother, you can also |
I do think this needs to be solved somehow. It doesn't seem right that the user should need to add an ignore in every single processor. We have 60+ processors and growing. I'm sure other people have even more. What I think would be an option is for |
Even if i agree with previous comments, you don't need to add it on every processor file, just add it in the phpstan.dist.neon to globally ignore this specific error:
|
I actually didn't realize that phpstan supported wildcards for paths. Thanks for this! |
we need a fix for that though, Illuminate\Request extends the Request so we could maybe just remove the laravel specific type? |
API Platform version(s) affected: 4.0.13
Description
With Symfony project and Phpstan 2.0 :
How to reproduce
Create a custom processor in symfony project and check phpstan.
Possible Solution
Not use Laravel Illuminate Type on Symfony project.
Additional Context
Le problème semble se situer dans le fichier suivant :
https://github.com/api-platform/core/blob/main/src/State/ProcessorInterface.php
The text was updated successfully, but these errors were encountered: