S
S
shapovaloff2020-01-22 11:44:21
Command line
shapovaloff, 2020-01-22 11:44:21

Can't install composer on windows?

Hello! Can't install composer on windows. Tried installing via .exe installer and via .phar in both cases, installation just hangs. Most likely the problem appeared after I could not install phpunit on my computer and used the instructions . Which said that you need to enter the command:

unalias $(alias | grep winpty | cut -d"=" -f1 | cut -d" " -f2)

.exe installer hangs at "Checking your command-line PHP"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Leonid, 2020-01-22
@caballero

why would you want to install something there? it's just a phar file
copied and
then you run everything
like
"z:\usr\local\php5\php.exe" "z:\composer.phar" update

F
Flying, 2020-01-22
@Flying

Just download composer.pharand save it somewhere. Then, in any directory accessible via the PATH environment variable, create a file composer.bat:

@echo off
x:\path\to\php.exe -c x:\path\to\php.ini -f x:\path\to\composer.phar -- %*

Naturally, replace the paths with real ones. It would also be good for you to have a separate one php.inifor Composer. Main differences:
memory_limit = 1024M   ; Возможно даже 2048M если проекты имеют много зависимостей
; также необходимо отключить XDebug

After that, it will be possible to access Composer simply through the command composer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question