File tree 1 file changed +60
-0
lines changed
1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,66 @@ http://example.com/typo3-patches.json
170
170
]
171
171
}
172
172
```
173
+
174
+ ## Provide patches from local stored files
175
+ You can use absolute paths or paths relative to the application root.
176
+
177
+ composer.json:
178
+ ``` json
179
+ "repositories" : [
180
+ {
181
+ "type" : " package" ,
182
+ "package" : {
183
+ "type" : " metapackage" ,
184
+ "name" : " vendor/package-patches" ,
185
+ "version" : " 1.0.0" ,
186
+ "require" : {
187
+ "netresearch/composer-patches-plugin" : " ~1.0"
188
+ },
189
+ "extra" : {
190
+ "patches" : {
191
+ "typo3/cms" : [
192
+ {
193
+ "title" : " [FEATURE] Allow registration of different login forms" ,
194
+ "url" : " patches/example_local_file.patch"
195
+ }
196
+ ]
197
+ }
198
+ }
199
+ }
200
+ }
201
+ ],
202
+ "require" : {
203
+ ....
204
+ },
205
+ ```
206
+ I have also added a new folder at the same level as the composer.json called "patches" and add a patch file example_local_file.patch like:
207
+
208
+ ```
209
+ # This patch file was generated by NetBeans IDE
210
+ # It uses platform neutral UTF-8 encoding and \n newlines.
211
+ --- a/src/com/zoho/crm/library/exception/Logger.php
212
+ +++ b/src/com/zoho/crm/library/exception/Logger.php
213
+ @@ -6,7 +6,7 @@
214
+ {
215
+ set_include_path(ZCRMConfigUtil::getConfigValue('applicationLogFilePath'));
216
+ $path=get_include_path();
217
+ - if($path{strlen($path)-1}!='\/')
218
+ + if($path[strlen($path)-1]!='\/')
219
+ {
220
+ $path=$path."/";
221
+ }
222
+
223
+
224
+ ```
225
+
226
+ * Note* that the patch will be called with the option -p1 (remove the first slash) and in the directory of the library.
227
+
228
+ Then run the commands to update the dependency and to install patches:
229
+ ```
230
+ composer update vendor/package-patches
231
+ composer install
232
+ ```
173
233
174
234
## Requiring the patches:
175
235
just require the package with the patches.
You can’t perform that action at this time.
0 commit comments