Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a vendor from a symfony2 project?

How to neatly remove vendor ?

SyliusCartBundle, that I'm installing, requires Stof 1.1.*, and my Symfony project has Stof 1.2.x. So I want to remove that Stof 1.2.

Is it comes down to removing:

  • stof directory from vendor directory
  • AppKernel line

And here the error output from 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.
like image 927
Sruj Avatar asked Jan 27 '15 22:01

Sruj


1 Answers

Here is what you need to do

  • delete line from AppKernel
  • remove any dependencies from the config.yml
  • remove the require statement from the projects composer.json

If you still get an error than one of your other vendor packages is requiring the one you have deleted so you will either have to stay with the bundle or delete all depending bundles

like image 125
Nickolaus Avatar answered Oct 14 '22 00:10

Nickolaus