Skip to content

Commit 68fced8

Browse files
committed
Show the real PHP version
1 parent ec5c3d8 commit 68fced8

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

src/app/Console/Commands/Version.php

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ class Version extends Command
3030
public function handle()
3131
{
3232
$this->comment('### PHP VERSION:');
33-
$this->runConsoleCommand(['php', '-v']);
33+
$this->line(phpversion());
34+
$this->line('');
35+
36+
$this->comment('### PHP EXTENSIONS:');
37+
$this->line(implode(', ', get_loaded_extensions()));
38+
$this->line('');
3439

3540
$this->comment('### LARAVEL VERSION:');
3641
$this->line(\Composer\InstalledVersions::getVersion('laravel/framework'));
@@ -44,27 +49,4 @@ public function handle()
4449
}
4550
}
4651
}
47-
48-
/**
49-
* Run a shell command in a separate process.
50-
*
51-
* @param array $command Text to be executed.
52-
* @return void
53-
*/
54-
private function runConsoleCommand($command)
55-
{
56-
$process = new Process($command, null, null, null, 60, null);
57-
$process->run(function ($type, $buffer) {
58-
if (Process::ERR === $type) {
59-
$this->line($buffer);
60-
} else {
61-
$this->line($buffer);
62-
}
63-
});
64-
65-
// executes after the command finishes
66-
if (! $process->isSuccessful()) {
67-
throw new ProcessFailedException($process);
68-
}
69-
}
7052
}

0 commit comments

Comments
 (0)