PHP CS Fixer File Watcher导致PHPStorm中的文件缓存冲突 [英] PHP CS Fixer File Watcher causes File Cache Conflict in PHPStorm
问题描述
我使用定义为此的文件监视程序
这是我的watchers.xml
文件:
<?xml version="1.0" encoding="UTF-8"?>
<TaskOptions>
<TaskOptions>
<option name="arguments" value="fix $FileDir$/$FileName$ --verbose " />
<option name="checkSyntaxErrors" value="false" />
<option name="description" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="php" />
<option name="immediateSync" value="true" />
<option name="name" value="PHP CS Fixer" />
<option name="output" value="" />
<option name="outputFilters">
<array />
</option>
<option name="outputFromStdout" value="false" />
<option name="program" value="/usr/local/bin/php-cs-fixer" />
<option name="scopeName" value="Project Files" />
<option name="trackOnlyRoot" value="false" />
<option name="workingDir" value="$ProjectFileDir$" />
<envs />
</TaskOptions>
</TaskOptions>
执行自动保存时,有时会收到有关内存和磁盘更改之间的冲突的错误消息.
While autosave executes, sometimes I am getting an error message about the conflict between changes in memory and on disk.
我该如何解决这个问题?
How can I solve this issue?
推荐答案
发生这种情况是因为PHP CS Fixer修改了文件,如@LazyOne所说,但是您的值输出刷新路径"为空,因此IDE无法知道这些变化.
It happens because PHP CS Fixer modifies the file, as @LazyOne said, but you have empty value of "Output paths to refresh" so IDE cannot know about these changes.
将要刷新的输出路径"的值设置为$FileName$
(与参数相同),以使PhpStorm知道更改(它取决于其他选项"中设置的工作目录"值-如果该值设置为$ FileDir $,则无需在刷新路径中提及它.
Set the value of "Output paths to refresh" to $FileName$
- same as in arguments - to make PhpStorm aware about the changes (it depends on the "Working directory" value which has been set in Other Options - if it is set to $FileDir$ then you don't need to mention it in the paths to refresh).
这篇关于PHP CS Fixer File Watcher导致PHPStorm中的文件缓存冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!