Skip to content
Merged
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
14 changes: 12 additions & 2 deletions parallel-lint
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ either expressed or implied, of the FreeBSD Project.
*/

if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
fwrite(STDERR, "PHP Parallel Lint requires PHP 5.3.0 or newer." . PHP_EOL);
fwrite(
STDERR,
sprintf(
'PHP Parallel Lint requires PHP 5.3.0 or newer.' . PHP_EOL
. 'You are using PHP %s (%s).' . PHP_EOL,
PHP_VERSION,
PHP_BINDIR
)
);
exit(254);
}

Expand Down Expand Up @@ -70,5 +78,7 @@ if (!$loaded) {

require_once __DIR__ . '/src/polyfill.php';

$app = new PHP_Parallel_Lint\PhpParallelLint\Application();
// Prevent parse error on PHP < 5.3 so the version check above can work.
$className = 'PHP_Parallel_Lint\PhpParallelLint\Application';
$app = new $className();
exit($app->run());