Is the stub analysis using different autoloading from the rest of the project? #6541
-
When running analysis in the actual project using stub from my extension I get a bunch of errors. Generally they are: Full list follows
I don't have any specific autoloading rules in the project and I'm using composer autoloader everywhere. The abovementioned classes are normally autoloaded in the code. This leads me to suspect that the stub is analysed outside of the normal code (e.g. before the project's autoloader is used). My another suspicion was that it has a problem with FQCN vs missing heading slash in the definition:
But that is not the case, neither with or without works. Also the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Please read this webpage carefully and all your concerns will be answered: https://phpstan.org/user-guide/stub-files |
Beta Was this translation helpful? Give feedback.
-
So for anyone wanting to save themself some time and a concise answer. Like @ondrejmirtes hinted to the website:
This means, |
Beta Was this translation helpful? Give feedback.
Please read this webpage carefully and all your concerns will be answered: https://phpstan.org/user-guide/stub-files