From 09b82ba48f34f4c21e5c6cc6918400e042b0c83d Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 1 Oct 2024 20:47:29 +0800 Subject: [PATCH] [5.x] Utilise `Illuminate\Support\php_binary()` This would improves installation on Laravel Herd Signed-off-by: Mior Muhammad Zaki --- src/NewCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NewCommand.php b/src/NewCommand.php index f9bef70..47a8d04 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -847,7 +847,9 @@ protected function findComposer() */ protected function phpBinary() { - $phpBinary = (new PhpExecutableFinder)->find(false); + $phpBinary = function_exists('Illuminate\Support\php_binary') + ? \Illuminate\Support\php_binary() + : (new PhpExecutableFinder)->find(false); return $phpBinary !== false ? ProcessUtils::escapeArgument($phpBinary)