symfony - 作曲家太老了

时间:2018-03-29 06:19:36

标签: symfony ubuntu composer-php

我尝试启动symfony时遇到问题,错误是:

composer require server --dev
Some Symfony Flex features may not work as expected: your version of Composer is too old
Please upgrade using https://getcomposer.org/

我尝试更新作曲家,但我无法找到方法,在作曲家文档中here我遵循了以下步骤:

php -r "if (hash_file('SHA384', 'composer-setup.php') === '52cb7bbbaee720471e3b34c8ae6db53a38f0b759c06078a80080db739e4dcab6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer corrupt

所以,我陷入了错误循环,我该怎么办?

(我在ubuntu工作)

当然我试过了:

composer self-update


  [InvalidArgumentException]             
  Command "self-update" is not defined. 

1 个答案:

答案 0 :(得分:1)

命令self-update i仅在将composer安装为phar时可用,而不是作为全局项目中的依赖项或通过apt安装。

因此您需要卸载composer并使用phar重新安装它,然后才能使用自我更新

Documentation