You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ It's (kind-of) an alternative to two other great plugins (differences will becom
41
41
_<sup>1</sup> Root package patching is the exception, please see [applying patches to root package](docs/usage.md#applying-patches-to-root-package-root-project-folder) in usage docs._
42
42
43
43
44
-
### Some feature hilights
44
+
##Feature description
45
45
46
46
- Apply patches from dedicated composer packages (package your patchset!).
47
47
- Each patch can have a version constraint (composer semver) checked against the target package.
@@ -63,7 +63,19 @@ _<sup>1</sup> Root package patching is the exception, please see [applying patch
63
63
64
64
Double composer update/install for build is not necessary.
65
65
66
-
### Chicken or egg problem
66
+
## Use Git for applying patches
67
+
68
+
By default the library will try to use the `patch` command if not available and fall back to `git` otherwise.
69
+
You can force using git for each patch (see: [Usage Documentation](docs/usage.md)).
70
+
71
+
There were some problems using `git apply` reported in other plugins for packages that were not installed
72
+
as source (did not have a git repo; `.git` dir). I was not able to reproduce this problem with git 2.X - however -
73
+
a workaround for this potential problem has been implemented:
74
+
75
+
- If the target package has `.git` directory, then the patches are applied relative to target package root
76
+
- If no git repo in target package then patches are applied from root project directory
77
+
78
+
## Chicken or egg problem
67
79
68
80
Patching via composer plugin has one big problem - you cannot catch all events on the first install.
69
81
Furthermore applying patches on package install/remove is very error prone as you can never predict
@@ -79,7 +91,7 @@ of your project then you should patch the root package because the patch applica
79
91
plugins have done their work so patching source files in vendor will have no effect.**
80
92
81
93
82
-
### No remote patches
94
+
##Why no remote patches
83
95
84
96
This plugin will not download patches from external sources directly (http). I consider this a bad practice and will
85
97
never support it. I won't even comment on downloading patches using unencrypted connection without SHA check. Also what
0 commit comments