Skip to content

Commit 277166b

Browse files
authored
Merge pull request #1525 from nextcloud/dependabot/composer/stable27/cweagans/composer-patches-1.7.3
2 parents 40ba794 + 40c376d commit 277166b

File tree

4 files changed

+34
-16
lines changed

4 files changed

+34
-16
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer/installed.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -357,17 +357,17 @@
357357
},
358358
{
359359
"name": "cweagans/composer-patches",
360-
"version": "1.7.1",
361-
"version_normalized": "1.7.1.0",
360+
"version": "1.7.3",
361+
"version_normalized": "1.7.3.0",
362362
"source": {
363363
"type": "git",
364364
"url": "https://github.com/cweagans/composer-patches.git",
365-
"reference": "9888dcc74993c030b75f3dd548bb5e20cdbd740c"
365+
"reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db"
366366
},
367367
"dist": {
368368
"type": "zip",
369-
"url": "https://api.github.com/repos/cweagans/composer-patches/zipball/9888dcc74993c030b75f3dd548bb5e20cdbd740c",
370-
"reference": "9888dcc74993c030b75f3dd548bb5e20cdbd740c",
369+
"url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db",
370+
"reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db",
371371
"shasum": ""
372372
},
373373
"require": {
@@ -378,7 +378,7 @@
378378
"composer/composer": "~1.0 || ~2.0",
379379
"phpunit/phpunit": "~4.6"
380380
},
381-
"time": "2021-06-08T15:12:46+00:00",
381+
"time": "2022-12-20T22:53:13+00:00",
382382
"type": "composer-plugin",
383383
"extra": {
384384
"class": "cweagans\\Composer\\Patches"
@@ -402,7 +402,7 @@
402402
"description": "Provides a way to patch Composer packages.",
403403
"support": {
404404
"issues": "https://github.com/cweagans/composer-patches/issues",
405-
"source": "https://github.com/cweagans/composer-patches/tree/1.7.1"
405+
"source": "https://github.com/cweagans/composer-patches/tree/1.7.3"
406406
},
407407
"install-path": "../cweagans/composer-patches"
408408
},

composer/installed.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
'dev_requirement' => false,
6666
),
6767
'cweagans/composer-patches' => array(
68-
'pretty_version' => '1.7.1',
69-
'version' => '1.7.1.0',
70-
'reference' => '9888dcc74993c030b75f3dd548bb5e20cdbd740c',
68+
'pretty_version' => '1.7.3',
69+
'version' => '1.7.3.0',
70+
'reference' => 'e190d4466fe2b103a55467dfa83fc2fecfcaf2db',
7171
'type' => 'composer-plugin',
7272
'install_path' => __DIR__ . '/../cweagans/composer-patches',
7373
'aliases' => array(),

cweagans/composer-patches/src/Patches.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class Patches implements PluginInterface, EventSubscriberInterface {
4848
*/
4949
protected $patches;
5050

51+
/**
52+
* @var array $installedPatches
53+
*/
54+
protected $installedPatches;
55+
5156
/**
5257
* Apply plugin modifications to composer
5358
*
@@ -564,6 +569,19 @@ protected function applyPatchWithGit($install_path, $patch_levels, $filename) {
564569
return $patched;
565570
}
566571

572+
/**
573+
* Indicates if a package has been patched.
574+
*
575+
* @param \Composer\Package\PackageInterface $package
576+
* The package to check.
577+
*
578+
* @return bool
579+
* TRUE if the package has been patched.
580+
*/
581+
public static function isPackagePatched(PackageInterface $package) {
582+
return array_key_exists('patches_applied', $package->getExtra());
583+
}
584+
567585
/**
568586
* {@inheritDoc}
569587
*/

0 commit comments

Comments
 (0)