Open staabm opened 6 years ago
Yeah, wondered that too, as it's not described at all in the readme. but reading source code of the plugin seems all files that are not defined as an autoloader, get removed, with some hard coded defaults that are never removed.
First I liked the idea that it's done this way, that doesn't have to inspect every package to see what to cleanup, but reading https://github.com/dg/composer-cleaner/issues/16 seems this could be a problem for packages that bundle more than PHP sources.
I have added more information to the readme.
(for posterity) link to above changes https://github.com/dg/composer-cleaner/commit/ac989d0364610b016d4ca6533cec99969dfb6d41
does the cleaner support extra.cleaner-ignore
from the vendored project composer.json
as well? as it would more sense to submit those to upstream projects.
but then again the upstream projects can use .gitattributes
if they care about the problem and then cleaner does not need to do that:
in such case those projects should be skipped, perhaps the introduce new key which projects indicate they do not need cleaning (but package extra runtime files required).
aside, maybe introduce commandline support here? to be run manually, i.e when producing release tarball. I'm currently cleaning the vendor using whitelisted patterns to delete. whitelist because not to break every new dependency without analyze what is needed for runtime:
Would be great to have a few examples or similar of files which this plugins will delete and why...