From a862f188367ce237f5775c91a8d2db04edbcfddf Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Sat, 7 May 2016 10:23:57 +0200 Subject: [PATCH] If a plugin is installed as symlink, drop from dependencies calculation --- system/src/Grav/Common/GPM/GPM.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/src/Grav/Common/GPM/GPM.php b/system/src/Grav/Common/GPM/GPM.php index 38b25029d..09e1ec211 100644 --- a/system/src/Grav/Common/GPM/GPM.php +++ b/system/src/Grav/Common/GPM/GPM.php @@ -115,6 +115,11 @@ class GPM extends Iterator return isset($this->installed['plugins'][$slug]); } + public function isPluginInstalledAsSymlink($slug) + { + return $this->installed['plugins'][$slug]->symlink; + } + /** * Return the instance of a specific Theme * @param string $slug The slug of the Theme @@ -636,6 +641,11 @@ class GPM extends Iterator } if ($this->isPluginInstalled($dependency_slug)) { + if ($this->isPluginInstalledAsSymlink($dependency_slug)) { + unset($dependencies[$dependency_slug]); + continue; + } + $dependencyVersion = $this->calculateVersionNumberFromDependencyVersion($dependencyVersionWithOperator); // get currently installed version