You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been in the process of updating my codebase over to version 4.x (and along with it, PHP 8.1), and with 4.0.4 I've discovered that PhpStan is very much not happy about the fact that the AbstractOpenApi class, for one example, is in the same file as OpenApi, which prevents it from auto-discovering it properly. In my code, for type-correctness, I need to return OpenApi, which is why it's throwing that same error in my codebase as well.
In general, I'm noticing both PhpStorm and PhpStan are really having a hard time coming to terms with the way the code is structured in 4.0.x. PhpStorm keeps telling me there's multiple versions of each class, even though one version should never be executed in my code (it can't quite figure that out).
The text was updated successfully, but these errors were encountered:
Sigh. Yes, I know. It was the simplest solution and coding and testing all by myself I never ran into these problems 😋
Maybe I really should look into this again...
For whatever reason, the above solution didn't work for me. To fix the Class OpenApi\Annotations\AbstractOpenApi was not found while trying to analyse it error, I had to use the scanFiles option:
I've been in the process of updating my codebase over to version 4.x (and along with it, PHP 8.1), and with 4.0.4 I've discovered that PhpStan is very much not happy about the fact that the
AbstractOpenApi
class, for one example, is in the same file asOpenApi
, which prevents it from auto-discovering it properly. In my code, for type-correctness, I need to returnOpenApi
, which is why it's throwing that same error in my codebase as well.In general, I'm noticing both PhpStorm and PhpStan are really having a hard time coming to terms with the way the code is structured in 4.0.x. PhpStorm keeps telling me there's multiple versions of each class, even though one version should never be executed in my code (it can't quite figure that out).
The text was updated successfully, but these errors were encountered: