I am looking for a way to simplify the different php versions and also paths of Composer. I found an approach in this answer that looks very appropriate for me.
I have tried to implement the following for understanding
function composer ()
{
if [ "$PWD" == "/home/vhosts/domainName/httpdocs" ]; then
/usr/bin/php7.3 lib/composer
elif [ "$PWD" == "/home/vhosts/domainName2/httpdocs" ]; then
/usr/bin/php5.6 composer.phar
else
composer
fi;
}
This works fine, but I am now looking for a way to transfer the stdin, so that a "composer install" is possible. I hope the question is understandable 😅