Skip to content

Commit

Permalink
Merge pull request #8 from cspray/task/use-correct-php-parser-factory
Browse files Browse the repository at this point in the history
Fix ParserFactory method used
  • Loading branch information
cspray authored Jun 4, 2024
2 parents 6b10529 + 8946d75 commit 015c6e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"require": {
"php": "^8.1",
"ext-dom": "*",
"cspray/annotated-target": "^1.1"
"cspray/annotated-target": "^1.1",
"nikic/php-parser": "^4.18 || ^5.0"
},
"require-dev": {
"cspray/phinal": "^2.0",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/SourceArchitecturalDecisionAttributeRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class SourceArchitecturalDecisionAttributeRegistry implements Architectura
public function __construct(
private readonly array $searchDir
) {
$this->parser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7);
$this->parser = (new ParserFactory())->createForNewestSupportedVersion();
}

public function getArchitecturalDecisionAttributes() : array {
Expand Down

0 comments on commit 015c6e4

Please sign in to comment.