Could not open input file [COMPOSER]

Dario picture Dario · Sep 11, 2015 · Viewed 11.8k times · Source

when i'm running this command : php composer.phar require sonata-project/user-bundle --no-update

i'm having this error: Could not open input file.

i did some research on google and i can see that a lot of peopple had the same problem like mine! but i don't find the way to solve it.

This is my path : %SystemRoot%\System32\Wbem;C:\ProgramData\Oracle\Java\javapath;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Windows\System32;C:\Program Files\nodejs\;C:\Program Files\Skype\Phone\;C:\ProgramData\ComposerSetup\bin\composer.phar

i followed the instruction on those website but it doesn't help me :

http://www.naeemrana.com/technology/how-to-install-composer-dependency-manager-for-php-in-windows/

Could not open input file: composer.phar

Answer

karolintxu picture karolintxu · Apr 1, 2016

Instead of

php composer.phar require sonata-project/user-bundle --no-update

run

composer require sonata-project/user-bundle --no-update