diff --git a/composer.json b/composer.json index 83b815d..37df840 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index bc96035..7bbded7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fbd334d53299f2eecd51e604a37d4f83", + "content-hash": "d637eae0f89b46c8697443fc90baba75", "packages": [ { "name": "cspray/annotated-target", diff --git a/src/SourceArchitecturalDecisionAttributeRegistry.php b/src/SourceArchitecturalDecisionAttributeRegistry.php index 1ad341f..2491a0f 100644 --- a/src/SourceArchitecturalDecisionAttributeRegistry.php +++ b/src/SourceArchitecturalDecisionAttributeRegistry.php @@ -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 {