Using PHP-CLI 8.1 as default
-
wrote on Oct 25, 2022, 8:01 AM last edited by
Hello
Would it be possible to move the PHP CLI up to php 8.1? So we don't have to use php8.1 as a command? This would be very useful for composer projects.
-
Hello
Would it be possible to move the PHP CLI up to php 8.1? So we don't have to use php8.1 as a command? This would be very useful for composer projects.
@FoksVHox I think you can set
alias php=php8.1
no? You can put it in/app/data/.bashrc
which makes it sourced in Web Terminal . -
@FoksVHox I think you can set
alias php=php8.1
no? You can put it in/app/data/.bashrc
which makes it sourced in Web Terminal .wrote on Nov 1, 2022, 5:35 PM last edited by FoksVHox Nov 1, 2022, 5:37 PM@girish said in Using PHP-CLI 8.1 as default:
alias php=php8.1
I wasn't aware that you had to create the
/app/data/.bashrc
, which resolved it. However, when using composer scripts (such as you do in Laravel projects) it'll use the 7.4.30 version instead of the aliased one. -
@girish said in Using PHP-CLI 8.1 as default:
alias php=php8.1
I wasn't aware that you had to create the
/app/data/.bashrc
, which resolved it. However, when using composer scripts (such as you do in Laravel projects) it'll use the 7.4.30 version instead of the aliased one.@FoksVHox I am not an expert on laravel, but can you point me to what issue one hits here because the php binary is still pointing to 7.4? Currently, it is difficult to create a package where the php binary is dynamic.
Are you refering to some issue like https://stackoverflow.com/questions/32750250/tell-composer-to-use-different-php-version ?