-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer install doesn't work #1503
Comments
Not sure what your problem is:
|
My apologies on the assumption of the need for the bin directory in your project. I did notice this morning the phpunit file in the root of the phpunit repository, so my assumption there is not correct; many apologies. However, I am still encountering the same problem. However, since you are able to get it installed properly using composer install, I will close this ticket, as the basis for it is an incorrect assumption. If I resolve my problem and discover the source of it, I will open or reopen as appropriate if the issue is in fact related to phpunit. Thanks. |
I think I have discovered the source of my problem. composer.json had an entry as follows:
And bin/phpunit was a symlink that pointed to ../vendor/phpunit/phpunit/composer/bin/phpunit. composer install was not updating that symlink, and when it tried to update the contents of bin/phpunit, which was a broken symlink, it failed and then tried to update via using the createUnixyProxy method, which also failed due to the broken symlink. It appears that the change in where the phpunit binary from 3.7 to 4.0 potentially confused composer, though I think composer should be able to gracefully handle the need to update a broken symlink in the bin folder better than what it does currently. Thanks, and I'm sorry for the false report. |
Thank you very much for the bug report though, as I ran into the exact same issue today and was able to resolve it by removing the bin dir… |
Installing by adding phpunit to the require-dev section of composer.json does not seem to work.
This currently attempts to pull in phpunit 4.3.5. The composer.json file specifies that there is a binary for phpunit in the bin-dir (bin/phpunit), but the code for phpunit in GitHub does not contain such a directory, much less a phpunit file in that directory. Thus, when it attempts to symlink it into bin/phpunit on the project level, it fails since there is no file to symlink in the first place.
This is on an Ubuntu Linux system, using the latest composer PHAR, as the ErrorException thrown is on line 246 of src/Composer/Installer/LibraryInstaller.php, and the error message is "file_put_contents(/xxxxxx/bin/phpunit): failed to open stream: No such file or directory" (the project directory path is not xxxxxx, it has been redacted).
Thanks.
The text was updated successfully, but these errors were encountered: