Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Utilise Illuminate\Support\php_binary() #53008

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Illuminate/Foundation/Console/ApiInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Process;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Process\PhpExecutableFinder;

use function Illuminate\Support\php_binary;

#[AsCommand(name: 'install:api')]
class ApiInstallCommand extends Command
Expand Down Expand Up @@ -65,7 +66,7 @@ public function handle()

if ($this->option('passport')) {
Process::run(array_filter([
(new PhpExecutableFinder())->find(false) ?: 'php',
php_binary(),
defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan',
'passport:install',
$this->confirm('Would you like to use UUIDs for all client IDs?') ? '--uuids' : null,
Expand Down Expand Up @@ -130,7 +131,7 @@ protected function installSanctum()

if (! $migrationPublished) {
Process::run([
(new PhpExecutableFinder())->find(false) ?: 'php',
php_binary(),
defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan',
'vendor:publish',
'--provider',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Process;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Process\PhpExecutableFinder;

use function Illuminate\Support\php_binary;
use function Laravel\Prompts\confirm;

#[AsCommand(name: 'install:broadcasting')]
Expand Down Expand Up @@ -155,7 +155,7 @@ protected function installReverb()
]);

Process::run([
(new PhpExecutableFinder())->find(false) ?: 'php',
php_binary(),
defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan',
'reverb:install',
]);
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/ServeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Illuminate\Support\InteractsWithTime;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;

use function Illuminate\Support\php_binary;
use function Termwind\terminal;

#[AsCommand(name: 'serve')]
Expand Down Expand Up @@ -178,7 +178,7 @@ protected function serverCommand()
: __DIR__.'/../resources/server.php';

return [
(new PhpExecutableFinder)->find(false) ?: 'php',
php_binary(),
'-S',
$this->host().':'.$this->port(),
$server,
Expand Down