fix: larastan unable to recognize macro#30
fix: larastan unable to recognize macro#30calebdw wants to merge 1 commit intoIntervention:developfrom
Conversation
|
Thanks. As far as I can remember, #18 was the issue that led to the change. Which is actually only a workaround for a single edge case where no application key is available. In hindsight, one might consider reverting this. |
|
Ah, I know why that happens, I ran into this myself. When you use the facade in a service provider (e.g., The solution is to use I'll go through and clean up and usages which should solve both his issue and mine. |
Hello!
Every time I run PHPStan I'm getting this false positive:
Larastan recognizes macros because it boots the application and checks if this exists. However, it's not going to recognize it if the macro is never registered when running in console.
Registering a macro is very lightweight (literally just an array key assignment) so there's no performance implications to this.
Thanks!