jobiqo/composer-patches-install
Composer 安装命令:
composer require jobiqo/composer-patches-install
包简介
Composer plugin that detects patches.lock.json changes and triggers re-patching of affected packages.
README 文档
README
A Composer plugin that detects patches.lock.json changes and automatically triggers re-patching of affected packages. See cweagans/composer-patches#583
This is relevant for sites that use a git pull && composer install workflow. With composer-patches 2.x this is not sufficient anymore to get any patches.lock.json changes installed. The workaround is git pull && composer install && composer patches-repatch, but has downsides:
- Local development: developers need to remember a much longer command when they update their checkout,
composer installis not enough anymore. - Longer production downtimes than necessary. A full
composer patches-repatchtriggers all patched dependencies to be patched again, which is slow.
What it does internally
- On a fresh install (no
vendor/directory), pre-initialises thepatches.lock.jsoncache so the firstcomposer installdoes not trigger unnecessary reinstalls. - On subsequent composer install, compares
patches.lock.jsonagainst the cached copy invendor/composer/patches.lock.json. - Re-installs only the packages whose patch hashes have changed, so patches are always applied consistently.
- Supports
--no-devmode: dev-only packages are skipped when running without dev dependencies.
Requirements
- PHP 8.1+
- Composer 2.x
cweagans/composer-patches^2.0
Installation
composer require jobiqo/composer-patches-install
Usage
Generate a patches.lock.json file with composer-patches in the root of your project (next to composer.json). The plugin reads the patches key and its sha256 hashes (as written by cweagans/composer-patches v2) to decide which packages need to be reinstalled.
Run composer install and patch changes will be picked up automatically.
统计信息
- 总下载量: 42.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-03-10