Run path/to/php path/to/composer
Hi,
I read that I could set up php and composer path in the config file : MY CONFIG FILE
public function configure()
{
return $this->getConfigBuilder()
->server('[email protected]')
->deployDir('/kunden/homepages/9/d77835205/htdocs/des-hauts-debats')
->repositoryUrl('[email protected]:antoine1003/des-hauts-debats.git')
->remotePhpBinaryPath('/usr/bin/php7.1-cli')
->remoteComposerBinaryPath('/kunden/homepages/9/d77813505/htdocs/composer.phar')
->repositoryBranch('prod')
;
}
But when I run php bin/console deploy it use just /kunden/homepages/9/d77813505/htdocs/composer.phar update for example and I want it to use the full syntax /usr/bin/php7.1-cli kunden/homepages/9/d77813505/htdocs/composer.phar update because the default server php version is outdated and I can't change it (mutualised server).
Is there any way to do it?
I have the same issue.
remotePhpBinaryPath is ignored when run composer. Just composer is called without certain PHP interpreter.
In my opinion, the expected behavior is: php binary path is used for composer as well.
[Symfony\Component\Process\Exception\ProcessFailedException]
The command "ssh -A [email protected] '(export APP_ENV=prod; cd /storage/home/srv115367/project/releases/20190417184522 && /storage/home/srv115367/project/composer.phar install --no-dev --prefer-dist
--no-interaction --quiet)'" failed.
Exit Code: 2(Misuse of shell builtins)
Working directory: /var/www/project
Output:
================
Error Output:
================
Your requirements could not be resolved to an installable set of packages.
You can avoid this by specifying something like:
->remoteComposerBinaryPath('/usr/local/bin/php7.3 /usr/local/bin/composer')
in your DefaultDeployer (deploy.php file): public function configure()
{
return $this->getConfigBuilder()
...
->remoteComposerBinaryPath('/usr/local/bin/php7.3 /usr/local/bin/composer')
->repositoryBranch('prod');
}
@kordax , probably, yes:)
But we have the method remotePhpBinaryPath which should be responsible to set PHP binary path, otherwise, we do it twice (remotePhpBinaryPath and remoteComposerBinaryPath as in your example)