From 87de5239a0000b0fdfafbd16509b2f9c9cfdae06 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 11 Sep 2024 10:39:18 +0200 Subject: [PATCH] compatibility with php-parser 5 --- bin/dredd-hooks-laravel | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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",