Skip to content

Commit 015c6e4

Browse files
authored
Merge pull request #8 from cspray/task/use-correct-php-parser-factory
Fix ParserFactory method used
2 parents 6b10529 + 8946d75 commit 015c6e4

3 files changed

+4
-3
lines changed

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"require": {
1717
"php": "^8.1",
1818
"ext-dom": "*",
19-
"cspray/annotated-target": "^1.1"
19+
"cspray/annotated-target": "^1.1",
20+
"nikic/php-parser": "^4.18 || ^5.0"
2021
},
2122
"require-dev": {
2223
"cspray/phinal": "^2.0",

composer.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/SourceArchitecturalDecisionAttributeRegistry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class SourceArchitecturalDecisionAttributeRegistry implements Architectura
2323
public function __construct(
2424
private readonly array $searchDir
2525
) {
26-
$this->parser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7);
26+
$this->parser = (new ParserFactory())->createForNewestSupportedVersion();
2727
}
2828

2929
public function getArchitecturalDecisionAttributes() : array {

0 commit comments

Comments
 (0)