If you're working on a Windows machine and have the composer.bat
in your $PATH
(or %PATH%
),
Cygwin's Mintty terminal as well as the Gitbash will still complain about composer
not being a known command.
If you try to use composer
from a Mintty/Gitbash terminal, you'll get something like:
ssc@Stephan-Ultrabook MINGW64 /cygdrive/c/work/aoe/projects/cobra-aw/Project (develop)
$ composer update
-bash: composer: command not found
ssc@Stephan-Ultrabook MINGW64 /cygdrive/c/work/aoe/projects/cobra-aw/Project (develop)
$ which composer
which: composer: unknown command
To fix it, use whereis
to find the absolute path to the composer.phar
..
ssc@Stephan-Ultrabook MINGW64 /cygdrive/c/work/aoe/projects/cobra-aw/Project (develop)
$ whereis composer
composer: /cygdrive/c/opt/composer /cygdrive/c/opt/composer/composer.bat /cygdrive/c/opt/composer/composer.phar
.. then copy the binary to your (fake) /usr/bin
directory and make it executable..
ssc@Stephan-Ultrabook MINGW64 /cygdrive/c/work/aoe/projects/cobra-aw/Project (develop)
$ cp -p /cygdrive/c/opt/composer/composer.phar /usr/bin/composer
ssc@Stephan-Ultrabook MINGW64 /cygdrive/c/work/aoe/projects/cobra-aw/Project (develop)
$ chmod +x /usr/bin/composer
.. and you're all set. composer
will finally work as expected:
ssc@Stephan-Ultrabook MINGW64 /cygdrive/c/work/aoe/projects/cobra-aw/Project (develop)
$ which composer
/usr/bin/composer
ssc@Stephan-Ultrabook MINGW64 /cygdrive/c/work/aoe/projects/cobra-aw/Project (develop)
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing typo3/cms-composer-installers (1.2.5)
Cloning 68dce62bbfed9912583de4a1db16df8feb8f7e2d
- Installing typo3/class-alias-loader (1.0.0)
Cloning a9dd295c81ed0b51455644be420ab9210cad688f
- Installing bk2k/bootstrap-package (dev-master a79ff32)
Cloning a79ff3289ef47966a17ac9442179b33a117f24b1
- Installing pear/net_url2 (v2.2.0)
Cloning fa9b1ecb3c3e640d4a54d58d681a4cb7524f209e
- Installing pear/pear_exception (v1.0.0)
Cloning 8c18719fdae000b690e3912be401c76e406dd13b
- Installing symfony/finder (v2.7.9)
Cloning d20ac81c81a67ab898b0c0afa435f3e9a7d460cf
- Installing symfony/console (v2.7.9)
Cloning d3fc138b6ed8f8074591821d3416d8f9c04d6ca6
- Installing swiftmailer/swiftmailer (v5.4.1)
Cloning 0697e6aa65c83edf97bb0f23d8763f94e3f11421
- Installing psr/log (1.0.0)
Cloning fe0936ee26643249e916849d48e3a51d5f5e278b
- Installing psr/http-message (1.0)
Cloning 85d63699f0dbedb190bbd4b0d2b9dc707ea4c298
- Installing phpwhois/idna-convert (v0.8.2)
Cloning ea337954b43ae47f5ebba97c19d309081bebc46e
- Installing pear/http_request2 (v2.2.1)
Cloning d6c81670c504045248c1afdf896bb9a3288158de
- Installing doctrine/instantiator (1.0.5)
Cloning 8e884e78f9f0eb1329e445619e04456e64d8051d
- Installing cogpowered/finediff (0.3.1)
Cloning 339ddc8c3afb656efed4f2f0a80e5c3d026f8ea8
- Installing typo3/cms (7.6.2)
Cloning 124f5470b931f06fd2e6ecc2cbe46221375c863a