From 9a6f0c6e4ff078040b177adc959f06f6e03a29a0 Mon Sep 17 00:00:00 2001 From: Tjerk Ameel Date: Mon, 9 Mar 2015 21:51:38 +0100 Subject: [PATCH 1/3] Avoid installing magento-core in modman folder. --- .../Magento/Installer/CoreInstaller.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/MagentoHackathon/Composer/Magento/Installer/CoreInstaller.php b/src/MagentoHackathon/Composer/Magento/Installer/CoreInstaller.php index ba0b15f4..7d0927a3 100644 --- a/src/MagentoHackathon/Composer/Magento/Installer/CoreInstaller.php +++ b/src/MagentoHackathon/Composer/Magento/Installer/CoreInstaller.php @@ -153,4 +153,24 @@ public function getDeployStrategy(PackageInterface $package, $strategy = null) $deployStrategy->setIsForced($this->isForced); return $deployStrategy; } + + /** + * Returns the installation path of a package + * We don't use the parent class for this because Magento Core should never be installed in the modman-root-dir + * + * @param PackageInterface $package + * @return string path + */ + public function getInstallPath(PackageInterface $package) + { + $targetDir = $package->getTargetDir(); + $installPath = $this->getPackageBasePath($package) . ($targetDir ? '/'.$targetDir : ''); + + // Make install path absolute. This is needed in the symlink deploy strategies. + if (DIRECTORY_SEPARATOR !== $installPath[0] && $installPath[1] !== ':') { + $installPath = getcwd() . "/$installPath"; + } + + return $installPath; + } } From b22f70bf767cd129d0dd218dc0cdb3a98a8b7e9f Mon Sep 17 00:00:00 2001 From: Tjerk Ameel Date: Mon, 9 Mar 2015 22:48:15 +0100 Subject: [PATCH 2/3] adding debug info --- .../Composer/Magento/Installer/MagentoInstallerAbstract.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php b/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php index 73bb00df..ec0cf9a7 100644 --- a/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php +++ b/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php @@ -485,7 +485,9 @@ public function getParser(PackageInterface $package) */ public function getInstallPath(PackageInterface $package) { - + var_dump($this->modmanRootDir); + var_dump(!is_null($this->modmanRootDir)); + var_dump($this->modmanRootDir->isDir()); if (!is_null($this->modmanRootDir) && true === $this->modmanRootDir->isDir()) { $targetDir = $package->getTargetDir(); if (!$targetDir) { From 8142c93d329e79461cf079a31ec18ef83517075c Mon Sep 17 00:00:00 2001 From: Tjerk Ameel Date: Wed, 1 Apr 2015 18:02:39 +0200 Subject: [PATCH 3/3] Revert "adding debug info" This reverts commit b22f70bf767cd129d0dd218dc0cdb3a98a8b7e9f. --- .../Composer/Magento/Installer/MagentoInstallerAbstract.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php b/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php index ec0cf9a7..73bb00df 100644 --- a/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php +++ b/src/MagentoHackathon/Composer/Magento/Installer/MagentoInstallerAbstract.php @@ -485,9 +485,7 @@ public function getParser(PackageInterface $package) */ public function getInstallPath(PackageInterface $package) { - var_dump($this->modmanRootDir); - var_dump(!is_null($this->modmanRootDir)); - var_dump($this->modmanRootDir->isDir()); + if (!is_null($this->modmanRootDir) && true === $this->modmanRootDir->isDir()) { $targetDir = $package->getTargetDir(); if (!$targetDir) {