Skip to content

Commit 36233b2

Browse files
jrfnlgrogy
authored andcommitted
Make the version check more informative
Previously, the PHP version check run at the start of the script would display `PHP Parallel Lint requires PHP 5.3.0 or newer.` if the PHP version was too low. The message has been updated to include the currently detected PHP version and the path to the PHP binary. Note: both constants used are available in PHP cross-version.
1 parent ba8ac48 commit 36233b2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

parallel-lint

+9-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ either expressed or implied, of the FreeBSD Project.
3131
*/
3232

3333
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
34-
fwrite(STDERR, "PHP Parallel Lint requires PHP 5.3.0 or newer." . PHP_EOL);
34+
fwrite(
35+
STDERR,
36+
sprintf(
37+
'PHP Parallel Lint requires PHP 5.3.0 or newer.' . PHP_EOL
38+
. 'You are using PHP %s (%s).' . PHP_EOL,
39+
PHP_VERSION,
40+
PHP_BINDIR
41+
)
42+
);
3543
exit(254);
3644
}
3745

0 commit comments

Comments
 (0)