我尝试通过以下方式更新Composer:composer self-update
但遇到Composer\Downloader\TransportException
这是我从composer self-update --verbose
和php -d "apc.enable_cli=0" composer.phar self-update --verbose
Updating to version .
Downloading: 100%
[Composer\Downloader\TransportException]
"https://getcomposer.org/composer.phar" appears broken, and returned an empty 200 response
Exception trace:
() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:192
Composer\Util\RemoteFilesystem->get() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:62
Composer\Util\RemoteFilesystem->copy() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/SelfUpdateCommand.php:73
Composer\Command\SelfUpdateCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:897
Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:191
Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:117
Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:83
Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:43
require() at C:\ProgramData\ComposerSetup\bin\composer.phar:15
self-update
答案 0 :(得分:1)
我终于找出了问题所在。
当我通过代理服务器连接到互联网时,必须首先配置编译器,并在iconoclast中解释为PHP Composer behind http proxy我尝试将此变量添加到系统环境路径(Windows上的cource):
HTTP_PROXY(value = my.proxy.address:port)
HTTPS_PROXY(value = my.proxy.address:port)
HTTP_PROXY_REQUEST_FULLURI(value = 0)
HTTPS_PROXY_REQUEST_FULLURI(value = 0)
但是在设置了最后2个变量之后composer diag
遇到了错误:
Checking HTTP proxy support for request_fulluri
Checking HTTPS proxy support for request_fulluri
最后通过删除它们并重新启动我的PC,所有场景都按照它的假设继续进行。;)
BTW感谢您的支持