{"id":28387611,"url":"https://github.com/rectorphp/vendor-patches","last_synced_at":"2025-06-26T20:31:37.272Z","repository":{"id":66226651,"uuid":"434690441","full_name":"rectorphp/vendor-patches","owner":"rectorphp","description":"Vendor patches for Rector packages","archived":false,"fork":false,"pushed_at":"2025-05-19T20:10:31.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-31T00:52:00.644Z","etag":null,"topics":["composer","rector"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rectorphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-03T18:08:00.000Z","updated_at":"2025-05-19T20:10:34.000Z","dependencies_parsed_at":"2024-01-01T10:30:31.218Z","dependency_job_id":"80349ccd-49dc-488f-a652-d0b1cb7f68a7","html_url":"https://github.com/rectorphp/vendor-patches","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rectorphp/vendor-patches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Fvendor-patches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Fvendor-patches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Fvendor-patches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Fvendor-patches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rectorphp","download_url":"https://codeload.github.com/rectorphp/vendor-patches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rectorphp%2Fvendor-patches/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262139519,"owners_count":23265170,"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","rector"],"created_at":"2025-05-30T18:38:10.271Z","updated_at":"2025-06-26T20:31:37.228Z","avatar_url":"https://github.com/rectorphp.png","language":null,"readme":"# Vendor Patches\n\nShared patches for Rector packages, for easier re-use.\n\nThis meta package makes use of [cweagans/composer-patches](https://github.com/cweagans/composer-patches).\n\n\u003cbr\u003e\n\n## How to Use\n\nThe composer patches packages does not work as intuitively as you may expect. Yet, there is a combination, that clicks :)\n\n\u003cbr\u003e\n\n### ~~1. External File~~\n\nThe [external patch file](https://github.com/cweagans/composer-patches#using-an-external-patch-file) works only for main `rector/rector-src` repository. It cannot be used e.g. for dev packages that depend on `rector/rector-src\n\n:red_circle:\n\n### 2. Define Patch Paths in `rector/rector-src`\n\nThe patches must be defined in [`rector/rector-src` in `composer.json`](https://github.com/rectorphp/rector-src/blob/0dd833b1e29ba665bbb3acad85a6359f701f2e18/composer.json#L154-L164):\n\n```json\n{\n    \"extra\": {\n        \"patches\": {\n            \"package-name\": [\n                \"https://raw.github.com/.../patches/some.patch\"\n            ]\n        }\n    }\n}\n```\n\n* The path to patch **file must be absolute**. Relative path fails when using `rector/rector-src` as dependency, as the `composer.json` is nested there\n\n### 3. Add Patch File Here\n\nThe patch must be added to this repository in `/patches` directory.\n\n### 4. Allow Patches in Dependent Package\n\nThe dependency package (e.g. [rector/rector-symfony](https://github.com/rectorphp/rector-symfony)) must allow to install patches from `rector/rector-src` in the package `composer.json`:\n\n```json\n{\n    \"require-dev\": {\n        \"symplify/vendor-patches\": \"^10.0\"\n    },\n    \"extra\": {\n        \"enable-patching\": true\n    }\n}\n```\n\nIt also must require `symplify/vendor-patches package`, to invoke the plugin on `composer install`.\n\n\u003cbr\u003e\n\nThis is the setup that works :heavy_check_mark:\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frectorphp%2Fvendor-patches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frectorphp%2Fvendor-patches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frectorphp%2Fvendor-patches/lists"}