I have an issue where a client has had someone doing code changes directly in the vendor folder for some of the modules they use (not entirely sure on what modules tho). I need to find a way to see the differences between the vendor folder as it is in git vs after I have ran composer install. These changes should exclude package updates.
Do you guys know a good way to check this?
-
I believe you can try some tools to check the changes. For example: diffchecker.com/desktop. Copy your old vendor to a different place. Remove this old one from the current project. Try to run the composer install to get the fresh modules. After that you can compare two vendor folder.Khoa Truong– Khoa Truong2025年09月29日 15:21:58 +00:00Commented Sep 29 at 15:21
-
usually you will have locked version in composer.lock, if you install that anywhere and compare against the changed vendor, you can find the diff that way.rex– rex2025年09月29日 21:14:28 +00:00Commented Sep 29 at 21:14
1 Answer 1
As you may or may not know, the /vendor folder should not be modified at all, it is managed by composer.
Option 1: (cmd find)
If your client has their project online and so on a remote server, their "admin system" or "host" will be able to find which files was updated by a simple find cmd, for example
find vendor/ -type f -mtime -30 -print
This will show all files modified in the last 30 days.
Option 2: (composer install)
If the first option doesn't resolve anything, you have another solution, but you need first to do a backup or snapshot if you have the possibility.
This solution is to delete the vendor folder but first rename it in case of problems vendor -> vendor_old and then run composer install. If everything was done correctly, the /vendor folder will be reset according to your composer dependencies.
However, since I don't know your project, I can't guarantee that this will resolve the issue. As mentioned earlier, the /vendor folder should not be manually edited. If one of your team directly modify files in this folder for business need instead of properly rewriting them according to Magento best practices and rules, This option will cause you to lose all your manual changes in this /vendor folder.
Once again, don't forget to backup before any changes.
Good luck.