What happens
When I install this package with Composer, my vendor/ folder gets a bunch of files that aren't used at runtime:
tests/
bin/
Makefile
phpunit.xml
.phpcs.xml
.circleci/
.github/
composer.lock
The library only needs classes/ (autoloaded), wp-background-processing.php, composer.json, and license.txt.
Why it happens
The repo has no .gitattributes. Packagist builds the download from git archive, which includes every tracked file — so dev files come along too.
How to fix
Add a .gitattributes that marks dev files as export-ignore. Then Composer downloads only the runtime files.
Example:
/tests export-ignore
/bin export-ignore
/Makefile export-ignore
/phpunit.xml export-ignore
/.phpcs.xml export-ignore
/.circleci export-ignore
/.github export-ignore
/composer.lock export-ignore
I tested this locally and the install shrinks to just the runtime files. Glad to send a PR if helpful.
What happens
When I install this package with Composer, my
vendor/folder gets a bunch of files that aren't used at runtime:tests/bin/Makefilephpunit.xml.phpcs.xml.circleci/.github/composer.lockThe library only needs
classes/(autoloaded),wp-background-processing.php,composer.json, andlicense.txt.Why it happens
The repo has no
.gitattributes. Packagist builds the download fromgit archive, which includes every tracked file — so dev files come along too.How to fix
Add a
.gitattributesthat marks dev files asexport-ignore. Then Composer downloads only the runtime files.Example:
I tested this locally and the install shrinks to just the runtime files. Glad to send a PR if helpful.