From 5e6de454f3df442222af8222dab2e1c96a689681 Mon Sep 17 00:00:00 2001 From: Jisse Reitsma Date: Mon, 12 Aug 2024 14:36:25 +0200 Subject: [PATCH] Changed call in Nikic parser --- CHANGELOG.md | 5 +++++ PhpClass/Tokenizer.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fe4af1..4f44129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +# [2.4.2] = 12 August 2024 +### Fixed +- Changed call in Nikic parser + + # [2.4.1] = 24 June 2024 ### Fixed - Added JSON format to module list output diff --git a/PhpClass/Tokenizer.php b/PhpClass/Tokenizer.php index 1ad4b36..f1015f7 100644 --- a/PhpClass/Tokenizer.php +++ b/PhpClass/Tokenizer.php @@ -64,7 +64,7 @@ public function getImportedClassnamesFromFile(string $filename): array */ public function getImportedClassnamesFromSource(string $source): array { - $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7); + $parser = (new ParserFactory())->createForNewestSupportedVersion(); $traverser = new NodeTraverser; $traverser->addVisitor(new NameResolver); $stmts = $parser->parse($source);