jobiqo/composer-patches-install 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 install is not enough anymore.
  • Longer production downtimes than necessary. A full composer patches-repatch triggers all patched dependencies to be patched again, which is slow.

What it does internally

  1. On a fresh install (no vendor/ directory), pre-initialises the patches.lock.json cache so the first composer install does not trigger unnecessary reinstalls.
  2. On subsequent composer install, compares patches.lock.json against the cached copy in vendor/composer/patches.lock.json.
  3. Re-installs only the packages whose patch hashes have changed, so patches are always applied consistently.
  4. Supports --no-dev mode: dev-only packages are skipped when running without dev dependencies.

Requirements

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-03-10