Open acanthis opened 6 years ago
@acanthis What does that has to do with this package?
@ceesvanegmond
In method PhpCsAutoFixerV2::run()
runing the command git add
(https://github.com/wearejust/grumphp-extra-tasks/blob/master/src/Task/PhpCsAutoFixerV2.php#L52)), but after that, as the php-cx-fixer
changes the file, the git status
command shows the following:
$ git status На ветке master Ваша ветка опережает «origin/master» на 146 коммитов. (используйте «git push», чтобы опубликовать ваши локальные коммиты) Изменения, которые будут включены в коммит: (используйте «git reset HEAD <файл>…», чтобы убрать из индекса) изменено: TestFile.php Изменения, которые не в индексе для коммита: (используйте «git add <файл>…», чтобы добавить файл в индекс) (используйте «git checkout -- <файл>…», чтобы отменить изменения в рабочем каталоге) изменено: TestFile.php
if you then run the git add TestFile.php
command manually, the command git status
will display the following:
$ git status На ветке master Ваша ветка опережает «origin/master» на 146 коммитов. (используйте «git push», чтобы опубликовать ваши локальные коммиты) нечего коммитить, нет изменений в рабочем каталоге
such a feeling that the "git add" command is not executed
the command sent by the PHPStorm at the commit:
git -c core.quotepath=false commit --only -m "up" -- TestFile.php
sorry for my English )
@ceesvanegmond just try making a commit "bad file" using PHPStorm
and another question: why is the launch of the php-cs-fixer 2 times in a row?
... $this->runProcess($context, $config, $files, false); exec(sprintf('git add %s', implode(' ', $toAdd->toArray()))); $process = $this->runProcess($context, $config, $files, false); ...
Hi! If you make a commit using PHPStorm (GUI), the files remain changed