{"id":30357705,"url":"https://github.com/sunaoka/composer-vcs-export-plugin","last_synced_at":"2025-08-19T08:19:18.561Z","repository":{"id":303559268,"uuid":"1015861125","full_name":"sunaoka/composer-vcs-export-plugin","owner":"sunaoka","description":"Exports Composer VCS repositories to vendor directories applying .gitattributes export-ignore rules.","archived":false,"fork":false,"pushed_at":"2025-07-14T02:28:14.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-16T11:55:46.998Z","etag":null,"topics":["composer-plugin","gitattributes","php","vcs"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/sunaoka/composer-vcs-export-plugin","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/sunaoka.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-07-08T06:33:30.000Z","updated_at":"2025-08-04T01:19:49.000Z","dependencies_parsed_at":"2025-07-08T08:45:39.737Z","dependency_job_id":"be762980-1b7a-49cb-91d5-d33bfc839978","html_url":"https://github.com/sunaoka/composer-vcs-export-plugin","commit_stats":null,"previous_names":["sunaoka/composer-vcs-export-plugin"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sunaoka/composer-vcs-export-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaoka%2Fcomposer-vcs-export-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaoka%2Fcomposer-vcs-export-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaoka%2Fcomposer-vcs-export-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaoka%2Fcomposer-vcs-export-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunaoka","download_url":"https://codeload.github.com/sunaoka/composer-vcs-export-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunaoka%2Fcomposer-vcs-export-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271121199,"owners_count":24702732,"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-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["composer-plugin","gitattributes","php","vcs"],"created_at":"2025-08-19T08:19:17.796Z","updated_at":"2025-08-19T08:19:18.536Z","avatar_url":"https://github.com/sunaoka.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Composer VCS Export Plugin\n\n[![Latest](https://poser.pugx.org/sunaoka/composer-vcs-export-plugin/v)](https://packagist.org/packages/sunaoka/composer-vcs-export-plugin)\n[![License](https://poser.pugx.org/sunaoka/composer-vcs-export-plugin/license)](https://packagist.org/packages/sunaoka/composer-vcs-export-plugin)\n[![PHP](https://img.shields.io/packagist/php-v/sunaoka/composer-vcs-export-plugin)](composer.json)\n[![Test](https://github.com/sunaoka/composer-vcs-export-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/sunaoka/composer-vcs-export-plugin/actions/workflows/test.yml)\n[![codecov](https://codecov.io/github/sunaoka/composer-vcs-export-plugin/graph/badge.svg)](https://codecov.io/github/sunaoka/composer-vcs-export-plugin)\n\n## Overview\n\nThis Composer plugin ensures that when installing packages from VCS repositories (such as Git) via the `repositories` configuration, only the files allowed by `.gitattributes` `export-ignore` rules are placed in the `vendor` directory.  \nIt enables clean, distribution-like installs even when directly referencing VCS sources, helping maintain a tidy `vendor/` with only the intended files from each package.\n\n## Features\n\n- Applies `.gitattributes` `export-ignore` rules to packages installed from VCS repositories\n- Ensures only distribution-ready files are present in `vendor/`\n- Works automatically during Composer install/update\n- No configuration required for standard usage\n\n## Installation\n\nAdd the plugin to your project using Composer:\n\n```bash\ncomposer require --dev sunaoka/composer-vcs-export-plugin\n```\n\nOr\n\n```bash\ncomposer global require sunaoka/composer-vcs-export-plugin\n```\n\n## Usage\n\nNo additional configuration is needed.  \nWhen you install or update packages from VCS repositories (e.g., via the `repositories` section in your `composer.json`), this plugin will:\n\n- Detect if the package was installed from a Git repository\n- Use `git archive` to export files, respecting `.gitattributes` `export-ignore` rules\n- Replace the package directory in `vendor/` with the exported contents\n\n## Example\n\n**composer.json:**\n\n```json\n{\n    \"repositories\": [\n        {\n            \"type\": \"vcs\",\n            \"url\": \"https://example.com/your-vendor/your-library.git\"\n        }\n    ],\n    \"require\": {\n        \"your-vendor/your-library\": \"^1.0\",\n        \"sunaoka/composer-vcs-export-plugin\": \"^1.0\"\n    },\n    \"config\": {\n        \"allow-plugins\": {\n          \"sunaoka/composer-vcs-export-plugin\": true\n        }\n    }\n}\n```\n\nWith this setup, only the files not marked with `export-ignore` in `.gitattributes` will be present in `vendor/your-vendor/your-library`.\n\n## Requirements\n\n- PHP 7.2.5 or later\n- Composer 2.x\n- `git` and `unzip` command available in the system environment\n\n## Limitations\n\n- Only works with Git repositories\n- Requires the `.git` directory to be present in the installed package (i.e., VCS install, not dist)\n- May not work on environments where `git archive` or `unzip` are unavailable (e.g., some Windows setups)\n- Does not affect packages installed via dist (zip/tarball)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunaoka%2Fcomposer-vcs-export-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunaoka%2Fcomposer-vcs-export-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunaoka%2Fcomposer-vcs-export-plugin/lists"}