Detecting modified files in the vendor directory with composer
Published on 2022-08-01 • Modified on 2022-08-01
This snippet shows how to list modified files in the vendor directory with composer. We all did it! Modifying files in the vendor directory to debug stuff. But, It can also happen that you close the file without removing the debug... You can't use git status
because it only works on your project files Composer has a command for this purpose for the vendor files. Note that you can have false positives like composer/package-versions-deprecated
I have on this project. But, the vendor/symfony/framework-bundle/Controller/AbstractController.php
file I have modified is correctly reported.
composer status -v
# You have changes in the following dependencies:
# /Users/coil/Sites/strangebuzz.com/vendor/composer/package-versions-deprecated:
# ./src/PackageVersions/Versions.php
# /Users/coil/Sites/strangebuzz.com/vendor/phpstan/extension-installer:
# ./src/GeneratedConfig.php
# /Users/coil/Sites/strangebuzz.com/vendor/symfony/framework-bundle:
# ./Controller/AbstractController.php
More on Stackoverflow Read the doc Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉
