如何从symfony2项目中删除供应商?

时间:2015-01-27 22:00:45

标签: symfony composer-php

如何巧妙地删除供应商?

我正在安装的SyliusCartBundle需要Stof 1.1。*,我的Symfony项目有Stof 1.2.x.所以我想删除那个Stof 1.2。

归结为删除:

  • 供应商目录中的stof目录
  • AppKernel line

这里是shell的错误输出:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: stof/doctrine-extensions-bundle[v1.1.0, 1.2.x-dev
].
    - Can only install one of: stof/doctrine-extensions-bundle[v1.1.0, 1.2.x-dev
].
    - sylius/order-bundle v0.12.0 requires stof/doctrine-extensions-bundle 1.1.*
 -> satisfiable by stof/doctrine-extensions-bundle[v1.1.0].
    - sylius/cart-bundle v0.12.0 requires sylius/order-bundle 0.12.*@dev -> sati
sfiable by sylius/order-bundle[v0.12.0].
    - Installation request for sylius/cart-bundle 0.12.* -> satisfiable by syliu
s/cart-bundle[v0.12.0].
    - Installation request for stof/doctrine-extensions-bundle == 1.2.9999999.99
99999-dev -> satisfiable by stof/doctrine-extensions-bundle[1.2.x-dev].


Installation failed, reverting ./composer.json to its original content.

1 个答案:

答案 0 :(得分:15)

这是你需要做的事情

  • AppKernel
  • 删除行
  • config.yml
  • 中删除所有依赖项
  • 从项目composer.json
  • 中删除require语句

如果您仍然收到错误,而您的其他供应商包之一要求您删除的那个,那么您将不得不继续使用该捆绑包或删除所有依赖捆绑包