diff --git a/bin/dredd-hooks-laravel b/bin/dredd-hooks-laravel index b9c0d34..6ca443a 100755 --- a/bin/dredd-hooks-laravel +++ b/bin/dredd-hooks-laravel @@ -49,7 +49,7 @@ $options = getopt('', [ // Second argument is the single kernel file $dreddKernelPath = $argv[1]; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory)->createForNewestSupportedVersion(); try { $statements = $parser->parse(file_get_contents($dreddKernelPath)); diff --git a/composer.json b/composer.json index 7b87f39..b343727 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "package", "require": { "php": ">=7.2", - "nikic/php-parser": "^4.2", + "nikic/php-parser": "^5.0", "ddelnano/dredd-hooks-php": "^2.0" }, "license": "MIT",