为什么Composer需要jquery安装不需要的PHP包?

时间:2017-04-17 08:59:36

标签: php jquery composer-php

我只是想要jQuery并输入命令行 composer require components/jquery ^1.11

但是日志告诉我:

Package operations: 4 installs, 0 updates, 0 removals
  - Installing symfony/process (v3.2.7): Loading from cache
  - Installing kriswallsmith/assetic (v1.4.0): Loading from cache
  - Installing robloach/component-installer (0.2.3): Loading from cache
  - Installing components/jquery (1.11.0): Loading from cache

为什么Composer会安装我从未打算安装的PHP相关软件包?我如何摆脱不需要的包裹?是否有更好/更清洁的安装方法?

1 个答案:

答案 0 :(得分:3)

您正尝试在1.11个版本的软件包上安装,这需要安装"robloach/component-installer"个软件包,您可以清楚地看到here

"require": {
        "robloach/component-installer": "*"
},

但是,robloach/component-installer也需要一些额外的包, 你也可以看到here

"require": {
        "php": ">=5.3.2",
        "kriswallsmith/assetic": "1.*",
        "composer-plugin-api": "^1.0"
},