diff --git a/composer.lock b/composer.lock index 86de4d8f2..388ef30b0 100644 --- a/composer.lock +++ b/composer.lock @@ -305,16 +305,16 @@ }, { "name": "cweagans/composer-patches", - "version": "1.7.1", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/cweagans/composer-patches.git", - "reference": "9888dcc74993c030b75f3dd548bb5e20cdbd740c" + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/9888dcc74993c030b75f3dd548bb5e20cdbd740c", - "reference": "9888dcc74993c030b75f3dd548bb5e20cdbd740c", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", "shasum": "" }, "require": { @@ -347,9 +347,9 @@ "description": "Provides a way to patch Composer packages.", "support": { "issues": "https://github.com/cweagans/composer-patches/issues", - "source": "https://github.com/cweagans/composer-patches/tree/1.7.1" + "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" }, - "time": "2021-06-08T15:12:46+00:00" + "time": "2022-12-20T22:53:13+00:00" }, { "name": "deepdiver/zipstreamer", diff --git a/composer/installed.json b/composer/installed.json index 64250abd4..94a181644 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -314,17 +314,17 @@ }, { "name": "cweagans/composer-patches", - "version": "1.7.1", - "version_normalized": "1.7.1.0", + "version": "1.7.3", + "version_normalized": "1.7.3.0", "source": { "type": "git", "url": "https://github.com/cweagans/composer-patches.git", - "reference": "9888dcc74993c030b75f3dd548bb5e20cdbd740c" + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/9888dcc74993c030b75f3dd548bb5e20cdbd740c", - "reference": "9888dcc74993c030b75f3dd548bb5e20cdbd740c", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", "shasum": "" }, "require": { @@ -335,7 +335,7 @@ "composer/composer": "~1.0 || ~2.0", "phpunit/phpunit": "~4.6" }, - "time": "2021-06-08T15:12:46+00:00", + "time": "2022-12-20T22:53:13+00:00", "type": "composer-plugin", "extra": { "class": "cweagans\\Composer\\Patches" @@ -359,7 +359,7 @@ "description": "Provides a way to patch Composer packages.", "support": { "issues": "https://github.com/cweagans/composer-patches/issues", - "source": "https://github.com/cweagans/composer-patches/tree/1.7.1" + "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" }, "install-path": "../cweagans/composer-patches" }, diff --git a/composer/installed.php b/composer/installed.php index 1797cd18c..6fb85dd3e 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'nextcloud/3rdparty', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '268aaeff738002179c0f5e9d9542ec362d987a5f', + 'reference' => 'fbca095e651ec56992cfaa15ec8d69e2d4114325', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), @@ -56,9 +56,9 @@ 'dev_requirement' => false, ), 'cweagans/composer-patches' => array( - 'pretty_version' => '1.7.1', - 'version' => '1.7.1.0', - 'reference' => '9888dcc74993c030b75f3dd548bb5e20cdbd740c', + 'pretty_version' => '1.7.3', + 'version' => '1.7.3.0', + 'reference' => 'e190d4466fe2b103a55467dfa83fc2fecfcaf2db', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../cweagans/composer-patches', 'aliases' => array(), @@ -310,7 +310,7 @@ 'nextcloud/3rdparty' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '268aaeff738002179c0f5e9d9542ec362d987a5f', + 'reference' => 'fbca095e651ec56992cfaa15ec8d69e2d4114325', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), diff --git a/cweagans/composer-patches/src/Patches.php b/cweagans/composer-patches/src/Patches.php index 4f77eb3b0..3d7d864a2 100644 --- a/cweagans/composer-patches/src/Patches.php +++ b/cweagans/composer-patches/src/Patches.php @@ -48,6 +48,11 @@ class Patches implements PluginInterface, EventSubscriberInterface { */ protected $patches; + /** + * @var array $installedPatches + */ + protected $installedPatches; + /** * Apply plugin modifications to composer * @@ -564,6 +569,19 @@ protected function applyPatchWithGit($install_path, $patch_levels, $filename) { return $patched; } + /** + * Indicates if a package has been patched. + * + * @param \Composer\Package\PackageInterface $package + * The package to check. + * + * @return bool + * TRUE if the package has been patched. + */ + public static function isPackagePatched(PackageInterface $package) { + return array_key_exists('patches_applied', $package->getExtra()); + } + /** * {@inheritDoc} */