Answer the question
In order to leave comments, you need to log in
How to undo changed files in composer? (composer revert modified files )?
Greetings.
Can you please tell me if
it is possible to undo the changed files through composer or reinstall the libraries?
The situation is this: there is a lib/vendors directory and in it I changed some library files for debugging,
through "composer status -v"
D:\projects\github\yii_cms>composer status -v
You have changes in the following dependencies:
D:\projects\github\yii_cms\common\lib\vendor/zhuravljov/yii2-debug:
M controllers/DefaultController.php
M views/layouts/main.php
Answer the question
In order to leave comments, you need to log in
You can just clean up the entire vendor directory and install all packages again
A small correction - not update but install. The latter will install exactly the versions that you had (pl composer.lock).
If your composer installed dependencies with prefer-dist (that is, you downloaded the archive), then yes. Just remove the directory and run composer install.
If your composer cloned the package and did a checkout, you can manually make the directory checkout necessary, or composer will offer to do it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question