I found a couple related posts, but those don\'t really answer my question. Let\'s say I want to install this package: https://github.com/pear/Net_Socket
an excerpt
Using --prefer-dist is the only native solution, but there will be situations where there is simply no packaged version available, and in those cases Composer will still fall back to git clones.
The only workaround I know of is to run a cleanup script after composer install that removes Git directories. Maybe a command like this:
find . -type d | grep .git | xargs rm -rf
Be careful to run this in your vendor directory, not your root directory.