Answer the question
In order to leave comments, you need to log in
How to choose php version for composer?
The server has php5.6 installed by default, but 7.4 is also available. I want composer to run with it. Or make an alias. Tried to do like this:
/usr/local/bin/composer_php7.4
#!/bin/bash
/opt/php74/bin/php /usr/local/bin/composer
Answer the question
In order to leave comments, you need to log in
You can add it to the ~/.bash_profile file (if needed for one user) or to the /etc/profile file (if needed for all users on the server):
export PATH=/opt/php74/bin/:$PATH
alias composer='/opt/php74/bin/php /usr/local/bin/composer'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question