0

我同时使用phpstanand apidoc,但我在 phpstan 上有一个错误,我找不到解决或忽略的方法。


 Error message "Internal error: [Semantical Error] The annotation "@apiDefine" in class App\Controller\UserController was never imported. Did you maybe forget to add a "use" statement for this annotation?  
     Run PHPStan with --debug option and post the stack trace to:                                                                                                                                                        
     https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md" cannot be ignored, use excludePaths instead.

据我了解,apidoc 不需要任何导入,但是当 phpstan 进入我的文件时,它不知道此注释,因此会触发错误。

在我看来,最好的解决方案是忽略这种错误,但它说:

不能忽略,请改用 excludePaths。

但我想将此文件保留在 phpstan 分析中。

我怎样才能修复这个错误或忽略它?

4

0 回答 0