File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
src/Illuminate/Foundation/Console Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 6
6
use Illuminate \Filesystem \Filesystem ;
7
7
use Illuminate \Support \Facades \Process ;
8
8
use Symfony \Component \Console \Attribute \AsCommand ;
9
- use Symfony \Component \Process \PhpExecutableFinder ;
9
+
10
+ use function Illuminate \Support \php_binary ;
10
11
11
12
#[AsCommand(name: 'install:api ' )]
12
13
class ApiInstallCommand extends Command
@@ -65,7 +66,7 @@ public function handle()
65
66
66
67
if ($ this ->option ('passport ' )) {
67
68
Process::run (array_filter ([
68
- ( new PhpExecutableFinder ())-> find ( false ) ?: ' php ' ,
69
+ php_binary () ,
69
70
defined ('ARTISAN_BINARY ' ) ? ARTISAN_BINARY : 'artisan ' ,
70
71
'passport:install ' ,
71
72
$ this ->confirm ('Would you like to use UUIDs for all client IDs? ' ) ? '--uuids ' : null ,
@@ -130,7 +131,7 @@ protected function installSanctum()
130
131
131
132
if (! $ migrationPublished ) {
132
133
Process::run ([
133
- ( new PhpExecutableFinder ())-> find ( false ) ?: ' php ' ,
134
+ php_binary () ,
134
135
defined ('ARTISAN_BINARY ' ) ? ARTISAN_BINARY : 'artisan ' ,
135
136
'vendor:publish ' ,
136
137
'--provider ' ,
Original file line number Diff line number Diff line change 7
7
use Illuminate \Filesystem \Filesystem ;
8
8
use Illuminate \Support \Facades \Process ;
9
9
use Symfony \Component \Console \Attribute \AsCommand ;
10
- use Symfony \Component \Process \PhpExecutableFinder ;
11
10
11
+ use function Illuminate \Support \php_binary ;
12
12
use function Laravel \Prompts \confirm ;
13
13
14
14
#[AsCommand(name: 'install:broadcasting ' )]
@@ -155,7 +155,7 @@ protected function installReverb()
155
155
]);
156
156
157
157
Process::run ([
158
- ( new PhpExecutableFinder ())-> find ( false ) ?: ' php ' ,
158
+ php_binary () ,
159
159
defined ('ARTISAN_BINARY ' ) ? ARTISAN_BINARY : 'artisan ' ,
160
160
'reverb:install ' ,
161
161
]);
Original file line number Diff line number Diff line change 8
8
use Illuminate \Support \InteractsWithTime ;
9
9
use Symfony \Component \Console \Attribute \AsCommand ;
10
10
use Symfony \Component \Console \Input \InputOption ;
11
- use Symfony \Component \Process \PhpExecutableFinder ;
12
11
use Symfony \Component \Process \Process ;
13
12
13
+ use function Illuminate \Support \php_binary ;
14
14
use function Termwind \terminal ;
15
15
16
16
#[AsCommand(name: 'serve ' )]
@@ -178,7 +178,7 @@ protected function serverCommand()
178
178
: __DIR__ .'/../resources/server.php ' ;
179
179
180
180
return [
181
- ( new PhpExecutableFinder )-> find ( false ) ?: ' php ' ,
181
+ php_binary () ,
182
182
'-S ' ,
183
183
$ this ->host ().': ' .$ this ->port (),
184
184
$ server ,
You can’t perform that action at this time.
0 commit comments