{"id":13803363,"url":"https://github.com/liborm85/composer-vendor-cleaner","last_synced_at":"2025-07-24T06:05:12.971Z","repository":{"id":35435724,"uuid":"217685636","full_name":"liborm85/composer-vendor-cleaner","owner":"liborm85","description":"Composer Vendor Cleaner removes unnecessary development files and directories from vendor directory.","archived":false,"fork":false,"pushed_at":"2024-11-21T11:43:48.000Z","size":96,"stargazers_count":31,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-25T23:04:54.351Z","etag":null,"topics":["cleaner","composer","composer-plugin","php","remove"],"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/liborm85.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-26T09:24:57.000Z","updated_at":"2025-02-21T14:32:13.000Z","dependencies_parsed_at":"2025-04-25T10:39:12.646Z","dependency_job_id":"09d403ab-8693-4793-9454-1551472f360a","html_url":"https://github.com/liborm85/composer-vendor-cleaner","commit_stats":{"total_commits":140,"total_committers":2,"mean_commits":70.0,"dds":"0.0071428571428571175","last_synced_commit":"ed55c98d04fcfe48375b4b2bdf770b0c89ce606f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/liborm85/composer-vendor-cleaner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liborm85%2Fcomposer-vendor-cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liborm85%2Fcomposer-vendor-cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liborm85%2Fcomposer-vendor-cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liborm85%2Fcomposer-vendor-cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liborm85","download_url":"https://codeload.github.com/liborm85/composer-vendor-cleaner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liborm85%2Fcomposer-vendor-cleaner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266801409,"owners_count":23986371,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cleaner","composer","composer-plugin","php","remove"],"created_at":"2024-08-04T01:00:30.279Z","updated_at":"2025-07-24T06:05:12.942Z","avatar_url":"https://github.com/liborm85.png","language":"PHP","funding_links":[],"categories":["Plugins"],"sub_categories":["Support"],"readme":"# Composer Vendor Cleaner [![Packagist](https://img.shields.io/packagist/v/liborm85/composer-vendor-cleaner.svg)](https://packagist.org/packages/liborm85/composer-vendor-cleaner)\n\nThis composer plugin removes unnecessary development files and directories from `vendor` directory.\n\n## Installation\n\nLocal installation to project:\n```\ncomposer require liborm85/composer-vendor-cleaner\n```\n\nGlobal installation:\n```\ncomposer global require liborm85/composer-vendor-cleaner\n```\n\n## Requirements\n\n- PHP 5.6.0+\n\n## Configuration\n\nDevelopment files and directories to remove can be defined in `composer.json` file\nin [`extra`](https://getcomposer.org/doc/04-schema.md#extra) data attribute per new key `dev-files`.\nGlob pattern syntax is fully supported.\n\nExample:\n```\n\"extra\": {\n    \"dev-files\": {\n        \"/\": [                  // means: find in all library packages directories and bin directory\n            \"tests/\",           // means: tests directory whatever\n            \"docs/\",\n            \".travis.yml\"       // means: .travis.yml file whatever\n        ],\n        \"*/*\": [                // means: find in all library packages directories, but NOT in bin directory\n            \"*.sh\"\n        ],\n        \"bin\": [                // means: find in composer bin directory\n            \"*.bat\"\n        ],\n        \"twig/twig\": [          // means: find only in twig/twig package directory\n            \"doc/\",\n            \"/drupal_test.sh\"   // means: only file in root directory of twig/twig package\n        ],\n        \"symfony/*\": [          // means: find in all symfony packages\n            \"Tests/\"\n        ],\n        \"other/package\": [\n            \"/src/**/*.md\"      // means: find whatever all md files in src directory, eg.: /src/dir1/test.md, /src/dir1/dir2/readme.md\n        ],\n        \"example/package\": [    // means: remove all files and directories in language directory without cs.php file\n            \"languages/*\",\n            \"!languages/cs.php\" // means: exclude cs.php file from remove\n        ]\n    }\n}\n```\n\nDevelopment files and directories can also be defined in an external json file, by specifying the relative path to\nthis file in the `dev-files` key in the root composer.json. The format is the same as above.\n```\n\"extra\": {\n    \"dev-files\": \"composer.dev-files.json\"\n}\n```\n\nExample of `composer.dev-files.json` file:\n```\n{\n  \"/\": [\n    \".github/\"\n  ],\n  \"twig/twig\": [\n    \"doc/\"\n  ]\n}\n```\n\nFor additional configuration can be used [`config`](https://getcomposer.org/doc/04-schema.md#config) attribute.\n\n- `match-case` _(default: `true`)_ - Match case of name files and directories.\n- `remove-empty-dirs` _(default: `true`)_ - Removes empty directories.\n- `no-dev-only` _(default: `false`)_ - If is set `true` start the cleanup only if the composer command is run with `--no-dev`.\n\nExample:\n```\n\"config\": {\n    \"dev-files\": {\n        \"match-case\": false,\n        \"remove-empty-dirs\": false\n    }\n}\n```\n\n## Why a new plugin?\n\nSome composer packages contain files and directories that do not belong to production servers, but composer\ndoes not solve this.\n\nExists a lot of plugins for composer trying to solve this issue, they don't have advanced patterns to filtering\nor they are not user definable. Or some have no configuration and it works automatically and delete almost everything\nand then the package does not work.\n\nThat's why I created a new one that allows advanced filtering by glob patterns.\n\nIf you miss a feature or find bug, please, create an [issue](https://github.com/liborm85/composer-vendor-cleaner/issues).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliborm85%2Fcomposer-vendor-cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliborm85%2Fcomposer-vendor-cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliborm85%2Fcomposer-vendor-cleaner/lists"}