【发布时间】:2019-08-14 22:33:07
【问题描述】:
我正在尝试向我的项目添加一个新的 composer 依赖项,但它不起作用。没有错误或任何东西 - 它只是默默地什么都不做:
[vagrant@localhost project]$ composer require bshaffer/oauth2-server-bundle
Using version ^0.4.0 for bshaffer/oauth2-server-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
[vagrant@localhost project]$ composer update --verbose
Loading composer repositories with package information
Updating dependencies (including require-dev)
就是这样。这就是所有的输出。到底是怎么回事?为什么 composer 不下载安装包?
附加信息:
- 机器安装了 PHP 5.6。
- 该项目安装了 Symfony 2.8 和许多其他库。
- 有一个
composer.lock文件,但无论我做什么,bshaffer/oauth2-server-bundle都不会添加到其中。我害怕完全删除并重新创建文件。 - 删除
vendor/和其他自动生成文件,然后运行composer install会导致重新安装所有库除了bshaffer/oauth2-server-bundle。
【问题讨论】:
-
我怀疑它来自安装的
composer版本。composer --version向您展示了什么?你可以在那里看到一个版本列表getcomposer.org/download -
您可能内存不足?我见过作曲家需要大量内存才能运行的卡片。
-
@AlvaroFlañoLarrondo 我也遇到过很多次,但通常最后会产生明确的异常消息。
-
@PierreEmmanuelLallemant 最新。作为我尝试的一件事,我将作曲家本身更新到了最新版本。没有变化。
标签: php composer-php