Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions compiler/src/Console/PrepareCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ private function buildPreloadScript(): void
$template = <<<'php'
<?php declare(strict_types = 1);

use PhpParser\Node;

%s
php;
$finder = Finder::create();
Expand Down Expand Up @@ -203,6 +205,8 @@ private function buildPreloadScript(): void
$output .= 'require_once __DIR__ . ' . var_export($path, true) . ';' . "\n";
}

$output .= 'class_alias(Node\\ArrayItem::class, Node\\Expr\\ArrayItem::class);' . "\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we somehow make uses of the old class be reported as deprecation errors?


file_put_contents($preloadScript, sprintf($template, $output));
}

Expand Down
Loading