From 27cb9a83ad9a67b93cd367c43ec9ce9cdc770b8a Mon Sep 17 00:00:00 2001 From: Yauheni Yurkevich Date: Thu, 18 Apr 2019 16:37:43 +0300 Subject: [PATCH] Use remotePhpBinaryPath when run composer --- src/Deployer/DefaultDeployer.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Deployer/DefaultDeployer.php b/src/Deployer/DefaultDeployer.php index fa28adc..5ae1bb9 100644 --- a/src/Deployer/DefaultDeployer.php +++ b/src/Deployer/DefaultDeployer.php @@ -337,11 +337,24 @@ private function doInstallDependencies(): void { if (true === $this->getConfig(Option::updateRemoteComposerBinary)) { $this->log('

Self Updating the Composer binary'); - $this->runRemote(sprintf('%s self-update', $this->getConfig(Option::remoteComposerBinaryPath))); + $this->runRemote( + sprintf( + '%s %s self-update', + $this->getConfig(Option::remotePhpBinaryPath), + $this->getConfig(Option::remoteComposerBinaryPath) + ) + ); } $this->log('

Installing Composer dependencies'); - $this->runRemote(sprintf('%s install %s', $this->getConfig(Option::remoteComposerBinaryPath), $this->getConfig(Option::composerInstallFlags))); + $this->runRemote( + sprintf( + '%s %s install %s', + $this->getConfig(Option::remotePhpBinaryPath), + $this->getConfig(Option::remoteComposerBinaryPath), + $this->getConfig(Option::composerInstallFlags) + ) + ); } private function doInstallWebAssets(): void @@ -390,7 +403,14 @@ private function doClearControllers(): void private function doOptimizeComposer(): void { $this->log('

Optimizing Composer autoloader'); - $this->runRemote(sprintf('%s dump-autoload %s', $this->getConfig(Option::remoteComposerBinaryPath), $this->getConfig(Option::composerOptimizeFlags))); + $this->runRemote( + sprintf( + '%s %s dump-autoload %s', + $this->getConfig(Option::remotePhpBinaryPath), + $this->getConfig(Option::remoteComposerBinaryPath), + $this->getConfig(Option::composerOptimizeFlags) + ) + ); } private function doCreateSymlink(): void