PHPStorm无视@deprecated评论
I deprecated a method in my project by adding @deprecated to the docBlock, expecting PHPStorm to pick that up when addressing that specific method. My PHPStorm, however, seems to disregard the comment and doesn't mark usages of that method as deprecated.
Now I do know that usage of this method is no longer allowed, but some of my colleagues may not. I just checked at someone else's computer and he's getting the deprecation warning, so it might not be a problem for everyone. I can't guarantee that though.
I invalidated the caches, rebooted PHPStorm, removed and re-added the @deprecated, but nothing seems to work.
Does anyone have a suggestion? Is there a setting I'm missing?
我通过将@deprecated添加到docBlock来弃用我的项目中的方法,期望PHPStorm在解决该问题时选择该方法 具体方法。 然而,我的 em> PHPStorm似乎忽略了评论,并没有将该方法的用法标记为已弃用。 p>
现在我 strong>做 知道不再允许使用这种方法,但我的一些同事可能不会。 我只是检查了别人的电脑,他正在收到弃用警告,所以对每个人来说都不是问题。 我不能保证这一点。 p>
我使缓存无效,重新启动PHPStorm,删除并重新添加@deprecated,但似乎没有任何效果。 p>
有人有建议吗? 有没有我缺少的设置? p>
div>
Oops, found it...
For some reason my settings were changed/set back to default and the 'error when deprecated' setting was turned off.
Settings -> Inspections -> PHP -> General -> Deprecated -> As error