用git做'composer dump-autoload'

I stumble upon across this note in README of one of the project in github

Run the command below when you just update your code (switch branch, merge/rebase, etc.):

composer dump-autoload

Why? From what I know dump-autoload just regenerates the list of all classes that need to be included in the project.

It might be a good idea because if you update your code via Git usually the vendor folder is excluded from Git. So if updating your code e.g. introduces a new class, this class isn't automatically in your vendor/composer/autoload_classmap.php. So running a composer dump-autoload will regenerate this list.