Closed o15a3d4l11s2 closed 4 months ago
Hey @o15a3d4l11s2
Thanks for reporting the issue and submitting a PR. I appreciate your efforts. I have assigned my colleague @pxpm to review the PR & merge.
Thanks🤝
Thanks @o15a3d4l11s2 🙏
Hope you are doing well man. Thanks for the contribution and for an excellent explanation of the issue as always! 👍
Merged & tagged!
Cheers
Story
While deploying a new app on a shared hosting (has PHP 7.4 in CLI, PHP 8.1 inside the served app), I noticed an issue - the command from
"post-install-cmd": ["php artisan storage:link --quiet"]
fails, complaining that Composer expects PHP 8.1, but PHP is version 7.4. The command I execute is/opt/cpanel/php81/root/usr/bin/php composer install
which explicitly uses PHP 8.1 for executing the composer install. But it is ignored byphp artisan storage:link --quiet
,which uses the default PHP 7.4 instead of the one I explicitly specified.Proposed fix
Prefix the command with
@
.Proof of similar usage:
@php
instead ofphp
.Warning
This is currently not an issue and with composer commands provided in an array format this will not be an issue, but worth mentioning: