{"id":21341427,"url":"https://github.com/avto-dev/composer-cleanup-plugin","last_synced_at":"2025-07-12T14:34:10.170Z","repository":{"id":51247063,"uuid":"191585293","full_name":"avto-dev/composer-cleanup-plugin","owner":"avto-dev","description":"Composer plugin for cleaning up unused files from packages.","archived":false,"fork":false,"pushed_at":"2023-11-17T09:16:15.000Z","size":91,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T21:44:47.765Z","etag":null,"topics":["composer","php","plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avto-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-12T14:17:45.000Z","updated_at":"2024-03-29T06:14:43.000Z","dependencies_parsed_at":"2023-11-17T08:54:47.335Z","dependency_job_id":"7191a5f7-cdbf-4dfa-833d-b3782faa5e76","html_url":"https://github.com/avto-dev/composer-cleanup-plugin","commit_stats":{"total_commits":73,"total_committers":10,"mean_commits":7.3,"dds":0.6712328767123288,"last_synced_commit":"45c5696229f4acb09e3a62e9d9982e6643324838"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avto-dev%2Fcomposer-cleanup-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avto-dev%2Fcomposer-cleanup-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avto-dev%2Fcomposer-cleanup-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avto-dev%2Fcomposer-cleanup-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avto-dev","download_url":"https://codeload.github.com/avto-dev/composer-cleanup-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225824750,"owners_count":17529906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","php","plugin"],"created_at":"2024-11-22T00:56:44.397Z","updated_at":"2024-11-22T00:56:45.040Z","avatar_url":"https://github.com/avto-dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"logo\" src=\"https://hsto.org/webt/qm/vw/f1/qmvwf1kh3qymvadnet4ggvt_pue.png\" height=\"160\" /\u003e\n\u003c/p\u003e\n\n# Composer Cleanup Plugin\n\n[![Version][badge_packagist_version]][link_packagist]\n[![Version][badge_php_version]][link_packagist]\n[![Build Status][badge_build]][link_build]\n[![Coverage][badge_coverage]][link_coverage]\n[![Downloads count][badge_downloads_count]][link_packagist]\n[![License][badge_license]][link_license]\n\nRemove tests \u0026 documentation from the vendor dir. Based on [barryvdh/composer-cleanup-plugin](https://github.com/barryvdh/composer-cleanup-plugin).\n\nUsually disk size shouldn't be a problem, but when you have to use FTP to deploy or have very limited disk space, you can use this package to cut down the vendor directory by deleting files that aren't used in production (tests/docs etc).\n\n\u003e **Note:** This package is still experimental, usage in production without detailed tests is not recommended.\n\n## Install\n\nRequire this package in your composer.json:\n\n```bash\n$ composer require avto-dev/composer-cleanup-plugin \"^2.0\"\n```\n\n## Usage\n\nIf you are using `composer:v1` you need to add lines to run the clean command after each package is installed:\n\n```json\n\"post-package-install\": [\n    \"AvtoDev\\\\Composer\\\\Cleanup\\\\Plugin::handlePostPackageInstallEvent\"\n],\n```\n\nIf you use `composer:v2` then all packages are installed in parallel, so automatic cleanup occurs after all packages are installed and the event fires `POST_AUTOLOAD_DUMP`.\n\n\n## What does it do?\n\nFor every installed or updated package in the default list, in general:\n\n1. Remove documentation, such as README files, docs folders, etc.\n2. Remove tests, PHPUnit configs, and other build/CI configuration.\n\nSome packages don't obey the general rules, and remove more/less files. Packages that do not have rules added are ignored.\n\n## Adding rules\n\nPlease submit a PR to [src/Rules.php] to add more rules for packages. Make sure you test them first, sometimes tests dirs are classmapped and will error when deleted.\n\n### Testing\n\nFor package testing we use `phpunit` framework and `docker-ce` + `docker-compose` as develop environment. So, just write into your terminal after repository cloning:\n\n```shell\n$ make build\n$ make latest # or 'make lowest'\n$ make test\n```\n\n## Changes log\n\n[![Release date][badge_release_date]][link_releases]\n[![Commits since latest release][badge_commits_since_release]][link_commits]\n\nChanges log can be [found here][link_changes_log].\n\n## Support\n\n[![Issues][badge_issues]][link_issues]\n[![Issues][badge_pulls]][link_pulls]\n\nIf you will find any package errors, please, [make an issue][link_create_issue] in current repository.\n\n## License\n\nThis is open-sourced software licensed under the [MIT License][link_license].\n\n[badge_packagist_version]:https://img.shields.io/packagist/v/avto-dev/composer-cleanup-plugin.svg?maxAge=180\n[badge_php_version]:https://img.shields.io/packagist/php-v/avto-dev/composer-cleanup-plugin.svg?longCache=true\n[badge_build]:https://img.shields.io/github/actions/workflow/status/avto-dev/composer-cleanup-plugin/tests.yml\n[badge_coverage]:https://img.shields.io/codecov/c/github/avto-dev/composer-cleanup-plugin/master.svg?maxAge=60\n[badge_downloads_count]:https://img.shields.io/packagist/dt/avto-dev/composer-cleanup-plugin.svg?maxAge=180\n[badge_license]:https://img.shields.io/packagist/l/avto-dev/composer-cleanup-plugin.svg?longCache=true\n[badge_release_date]:https://img.shields.io/github/release-date/avto-dev/composer-cleanup-plugin.svg?style=flat-square\u0026maxAge=180\n[badge_commits_since_release]:https://img.shields.io/github/commits-since/avto-dev/composer-cleanup-plugin/latest.svg?style=flat-square\u0026maxAge=180\n[badge_issues]:https://img.shields.io/github/issues/avto-dev/composer-cleanup-plugin.svg?style=flat-square\u0026maxAge=180\n[badge_pulls]:https://img.shields.io/github/issues-pr/avto-dev/composer-cleanup-plugin.svg?style=flat-square\u0026maxAge=180\n\n[link_releases]:https://github.com/avto-dev/composer-cleanup-plugin/releases\n[link_packagist]:https://packagist.org/packages/avto-dev/composer-cleanup-plugin\n[link_build]:https://github.com/avto-dev/composer-cleanup-plugin/actions\n[link_coverage]:https://codecov.io/gh/avto-dev/composer-cleanup-plugin/\n[link_changes_log]:https://github.com/avto-dev/composer-cleanup-plugin/blob/master/CHANGELOG.md\n[link_issues]:https://github.com/avto-dev/composer-cleanup-plugin/issues\n[link_create_issue]:https://github.com/avto-dev/composer-cleanup-plugin/issues/new/choose\n[link_commits]:https://github.com/avto-dev/composer-cleanup-plugin/commits\n[link_pulls]:https://github.com/avto-dev/composer-cleanup-plugin/pulls\n[link_license]:https://github.com/avto-dev/composer-cleanup-plugin/blob/master/LICENSE\n[src/Rules.php]:/src/Rules.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favto-dev%2Fcomposer-cleanup-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favto-dev%2Fcomposer-cleanup-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favto-dev%2Fcomposer-cleanup-plugin/lists"}