duanmu6752
2017-04-17 08:59
浏览 26
已采纳

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

I just wanted jQuery and entered in the command line composer require components/jquery ^1.11

But the log shows me:

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

Why does Composer install PHP related packages I never intended to install? And how do I get rid of the unwanted packages? Is there an better/cleaner install method?

图片转代码服务由CSDN问答提供 功能建议

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

但是日志显示我:

 包操作:4次安装,0次更新,0次删除
  - 安装symfony / 进程(v3.2.7):从缓存加载
  - 安装kriswallsmith / assetic(v1.4.0):从缓存加载
  - 安装robloach / component-installer(0.2.3):从缓存加载
  - 安装组件/  jquery(1.11.0):从缓存加载
   
 
 

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

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dplp5928 2017-04-17 09:20
    已采纳

    you are trying to install on of 1.11 versions of a package, which is requires "robloach/component-installer" package to install , you can see that clearly here :

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

    however, robloach/component-installer requires some additional packages too, also you can see that here

    "require": {
            "php": ">=5.3.2",
            "kriswallsmith/assetic": "1.*",
            "composer-plugin-api": "^1.0"
    },
    
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题