Skip to content

Commit

Permalink
Uses hosted version
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed May 27, 2024
1 parent cdb0208 commit ce5dc88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Mutation.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function create(
$modifiedSourcePath = self::TMP_FOLDER.DIRECTORY_SEPARATOR.hash('xxh3', $modifiedSource);
file_put_contents($modifiedSourcePath, $modifiedSource);

$orignalAst = (new ParserFactory)->createForVersion(PhpVersion::fromString('7.0'))->parse($file->getContents());
$orignalAst = (new ParserFactory)->createForHostVersion()->parse($file->getContents());
$newlyRenderedOriginalSource = (new Standard())->prettyPrintFile($orignalAst); // @phpstan-ignore-line

$endLine = $originalNode->getEndLine();
Expand Down
2 changes: 1 addition & 1 deletion src/Support/MutationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function generate(
}
}

$parser = (new ParserFactory)->createForVersion(PhpVersion::fromString('7.0'));
$parser = (new ParserFactory)->createForHostVersion();

$mutators = $this->filterMutators($mutators, $contents, $parser);

Expand Down
2 changes: 1 addition & 1 deletion tests/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

function mutateCode(string $mutator, string $code): string
{
$stmts = (new ParserFactory)->createForVersion(PhpVersion::fromString('7.0'))->parse($code);
$stmts = (new ParserFactory)->createForHostVersion()->parse($code);

$mutationCount = 0;

Expand Down

0 comments on commit ce5dc88

Please sign in to comment.