Excluding files from composer packages [duplicate] Excluding files from composer packages [duplicate] php php

Excluding files from composer packages [duplicate]


Composer does not support that as far as I know. In your scenario, the downloading occurs like this: Unless you use the parameter --prefer-source, Composer downloads the .zip archive from Github (for your library, this would be for example https://github.com/rowanhill/wiremock-php/archive/0.1.0.zip). Since this archive has already been prepared by github including all your files, there is no feasible way for composer not to download only a part of your library. If you use --prefer-source, the related tag is being checked out, but still without a filter.

By the way, composer caches the archive downloads, so even if the download is large, it should occur only once.

I am not sure about the archive/exclude part, but my guess would be that this is for generation of a local archive after you downloaded it, e.g. for satis.