symplify/vendor-patches
Apply and manage vendor patches in Composer projects. Automatically patch dependencies after install/update, keep patches versioned in your repo, and maintain reproducible builds without forking upstream packages.
This package allows developers to apply and manage patches to Composer-managed vendor dependencies without forking repositories or manually editing vendor files (which would be overwritten on updates). Start by installing it via Composer: composer require --dev symplify/vendor-patches. Then create a vendor-patches.yaml (or .json) config file in your project root to define patches—each patch maps a package name to one or more patch sources (e.g., local .patch files, URLs, or GitHub pull requests). The first use case is typically applying a critical bug fix from a GitHub PR to a package you rely on (e.g., drupal/core or symfony/http-foundation) until an official release is available.
vendor-patches.yaml), enabling teams and CI to reproducibly apply the same patches.patches/bugfix-123.patch), remote URLs (https://github.com/vendor/repo/pull/456.patch), or Drush-style "https://www.drupal.org/files/issues/2023-xx-xx.patch"—symplify/vendor-patches downloads and applies them automatically on composer install/update.vendor-patches as a dev dependency; in CI, patches apply silently during composer install, ensuring dev/staging/prod parity.extra.vendor-patches in composer.json.composer update, or ensure clean state.diff -u from a clean vendor install if needed.src/SomeClass.php, not ../src/SomeClass.php).composer install --dry-run or temporarily comment out patches to verify clean vendor reinstalls.--quiet and debug output: Run composer update -vvv to see verbose patch application logs— invaluable for diagnosing apply failures (e.g., Hunk failed at line X).How can I help you explore Laravel packages today?