Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony2: How to update a bundle whose source files have been modified?

I am using the KNP Pagination Bundle. I customized the twig file in the bundle source. Then I found a better way of doing it without touching the bundle's files.

Unfortunately, now everytime that I do

bin/vendors install

I get the following error:-

"KNP Paginator Bundle" has local modifications. Please revert or commit/push before running this command again.

My .gitignore file has ignored /vendors

And my deps file has the bundle included too.

Is there a way to uninstall a bundle? So that I can reinstall it? Or what is the best way to solve my problem?

like image 453
VishwaKumar Avatar asked Dec 22 '22 02:12

VishwaKumar


1 Answers

./bin/vendors doesn't care about content of .gitignore. You can fork desired bundle, do your changes there and change deps file to point to your fork instead.

If you still want to use original bundle and just reinstall it, you can either run ./bin/vendors install --reinstall or just delete the bundle folder from vendor directory and run ./bin/vendors install again.

like image 160
Anton Babenko Avatar answered Dec 26 '22 16:12

Anton Babenko