neocosmo/composer-patch-repository
最新稳定版本:v1.0-rc4
Composer 安装命令:
composer require neocosmo/composer-patch-repository
包简介
Apply patches to Composer packages from a repository.
README 文档
README
This Composer plugin allows to install patches for other Composer packages from a repository.
Usage
Create a separate composer package (the patch repository), that will hold your patches for other Composer packages.
Install this package and the patch repository package in the Composer project where you want to apply the patches.
In the composer.json of your project add
"patch-repository": "foo/bar"under"extra", where foo/bar is the Composer package name of your patch repository.Add patches to your patch repository and run
composer update foo/baron your project to apply the patches to packages.
Now you can run composer require, composer update and composer install
and the plugin will always install the patches from the patch repository for
any applicable versions of packages.
Patch repository
The patch repository needs to follow a specific layout of its folders and files that looks as follows:
foo/
bar/
1.0/
00_foobar.patch
- foo is the vendor of a package.
- bar the project name of the package.
- 1.0 is the version constraint for the patch. The version constraints are always interpreted with the caret operator. So 1.0 from the example actually means ^1.0.
- 00_foobar.patch is the actual patch file. Patch files need the extension .patch and are applied in alphanumerical order. If patch files with the same name exist for multiple version constraints for a single package, then always the file from the most recent applicable version constraint is used. If such a patch file is empty, this patch is not applied.
统计信息
- 总下载量: 1.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-06-03