[composer] - Updating friendsofphp/php-cs-fixer dev-master (6674476 => 0bd436b)
[composer]
[composer]
[composer] [RuntimeException]
[composer] Source directory /home/jenkins/workspace/myproject/vendor/friendsofphp/php-cs-fixer has uncommitted changes.
[composer]
[composer]
[composer] Exception trace:
[composer] () at phar:///home/jenkins/workspace/myproject/composer.phar/src/Composer/Downloader/VcsDownloader.php:209
running git status in the vendors dir:
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: tests/Fixtures/Integration/set/@PSR2_whitespaces.test-out.php
# modified: tests/Fixtures/Integration/set/@Symfony_whitespaces.test
# modified: tests/Fixtures/Integration/set/@Symfony_whitespaces.test-out.php
Any idea why do we have such test files in the vendor dir.
from what I can see you already have @Symfony.test and @Symfony_whitespaces.test comes with update
maybe the test are checkout out with diff. white space and so become marked as changed OOTB?
hm... but why would it care? i already installed beta on few envs.
and in the end, gitattrubutes on Fixtures is set up to don't care
I think this is a regression since #2221
In fact it affects only the _whitespace_ fixtures after checkout.
Maybe we have to provide additional attributes in gitattributes for those files?
like what? we already treat them as non-text and ignore during export
https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/.gitattributes
like
/tests/Fixtures/**/* -text -diff
which is the default for binary files
but displaying diff for that files is working. no need to turn it off
The problem occurs when running composer in no interaction mode:
composer update --no-interaction
The workaround that I've found so far is to discard all changes on vendor in composer.json:
"config": {
"discard-changes": true
},
I'm having the same issue here. Can someone suggest a solution for this? I won't implement @kachar 's solution above though. I have 4 different projects and this thing is happening randomly.
All I do in my build is composer install and composer self-update.
This is is just ODD. It produces a different problem everytime when I run build. IT HAS NOTHING TO DO WITH THE BUILD IF YOU SUSPECT. To solve this issue I have to delete whole folder and re-run the tests MANY TIMES REPEATEDLY. If it doesn't pass after 5th try, it will pass randomly after 9th try. If not after 2nd try, it will pass after 10th try. It is just ODD. It does what it likes. There has to be problem with this repo.
Now it passed with this output.
vendor/friendsofphp/php-cs-fixer$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: tests/Fixtures/Integration/set/@PSR2_whitespaces.test-out.php
# modified: tests/Fixtures/Integration/set/@Symfony_whitespaces.test-out.php
#
no changes added to commit (use "git add" and/or "git commit -a")
maybe the .gitattibutes are not honored by all git clients, can someone (who has this problem) provide details about the git client used (and OS)?
on a side note;
# modified: tests/Fixtures/Integration/set/@PSR2_whitespaces.test-out.php
# modified: tests/Fixtures/Integration/set/@Symfony_whitespaces.test-out.php
these files only exist on master, you might want to switch back to a stable and supported version while this is being looked into.
I'm using it on 3 environments:
Debian GNU/Linux 5.0.10 (lenny)
git --version
git version 1.7.2.5
Debian GNU/Linux 7.5 (wheezy)
git --version
git version 1.7.10.4
Windows 10
git --version
git version 1.9.5.msysgit.1
This is currently what I have:
"friendsofphp/php-cs-fixer": "2.0.*@dev"Don't think this is a bug with us tbh.
only thing I can think of is the git client version, anyone with git client @ version 2.x with this problem?
Closing as we didn't get the input needed to investigate this any further. If anyone who has this issue can help out; please comment here and we'll reopen it and continue.
I had this error which I resolved by just deleting vendor directory and 'make composer install'
Most helpful comment
The problem occurs when running composer in no interaction mode:
The workaround that I've found so far is to discard all changes on vendor in
composer.json: