Skip to content

Commit ba8ac48

Browse files
jrfnlgrogy
authored andcommitted
Allow version check in application entry file to work
By putting the class name, which contains PHP 5.3 namespace separator tokens, as a variable and then dynamically calling the class, the parse error on PHP < 5.3 is prevented and the version check at the top of the file can work as expected. Fixes 62
1 parent fc228da commit ba8ac48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

parallel-lint

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,7 @@ if (!$loaded) {
7070

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

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

0 commit comments

Comments
 (0)