Skip to content

Commit 493357f

Browse files
committed
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 3512cb9 commit 493357f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

parallel-lint

Lines changed: 3 additions & 1 deletion
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 JakubOnderka\PhpParallelLint\Application();
73+
// Prevent parse error on PHP < 5.3 so the version check above can work.
74+
$className = 'JakubOnderka\PhpParallelLint\Application';
75+
$app = new $className();
7476
exit($app->run());

0 commit comments

Comments
 (0)