InvalidArgumentException composer sets symfony

I am trying to install symfony 2.4.1 from a composer.json file using the following command:

 php composer.phar install 

I run this command from the root directory that contains the composer.json file (var / www / projectname /)

Several packages are installed correctly. When installing the Doctrine package, I get the following error:

InvalidArgumentException $ from (/ var / www / projectname / bin / doctrine) and $ to () must be absolute paths.

This is what I have already tried:

  • launch php composer.phar selfupdate (now the latest version)
  • php update composer.phar
  • running php composer.phar install

The entire project (including composer.json) was deleted and a new installation was launched using composer.phar create-project symfony / framework-standard-edition / var / www / [PROJECTNAME] 2.4. * --prefer-dist

one application: I use a stroller using a virtual box with a Windows 7 share. And I execute commands through ssh.

Here you will find the error report http://pastebin.com/rFk4vfnL

This is the output of php -version:

 PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:27:25) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies 
+6
source share
3 answers

Please delete the composer's cache ( ~/.composer/cache/ ) and try again.

also:

  • Are you using the latest version? ( composer.phar selfupdate )
  • Do you use the composer as a user who has write rights to everything inside /var/www/projectname/ ?

Update

The composer wants to symbolize the doctrine script in your bin directory, and it seems that findShortestPath() does not get the correct paths when called. I have never seen this before :(

If I understand correctly, you use the composer inside the "synchronized folder" in the guest guest house:

  • Why do you run the composer on a guest computer, and not on the host?
  • Can you try running the composer (setting up your project) somewhere else with the guest? (not in the synchronized folder) Thus, you can exclude whether it has something to do with this Windows 7 resource.

Update

Thus, the problem is running the composer in a synchronized folder on the Windows 7 host. The next step is to get the composer source and debug the LibraryInstaller::installBinaries() method. Start by checking that realpath($binPath) does not return false or something like that.

But I have to ask again: why are you doing this? Usually one sets up a Vagrant box with synchronized folders to be able to grow on the host and run it on the guest (which simulates a production server). So you can usually run the composer on the host, not the guest ...

+7
source

Try using the installation instructions with a lot of options:

 $ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.4.1 
0
source

From what I can tell (based on the answer from @jasper), there is a problem with the linker creating a symbolic link to your bin folder ... This is probably due to the fact that the file system does not support symbolic links (host file system, which was then shared with a guest), a good test would be to try to run a tramp in a Linux box and see if the problem went away.

The only way I can solve this problem is to install global dependencies inside the guest system (which seems to hit the point of using Vagrant).

Please note: I do not have a Windows machine for testing, but the symlink problem struck me earlier when you use samba sharing and NTFS / FAT32 file system.

0
source

All Articles