Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nikic/php-parser v4 BC layer for renamed classes #3529

Closed
wants to merge 1 commit into from
Closed

Conversation

ondrejmirtes
Copy link
Member

No description provided.

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 2.0.x. PHPStan 2.0 is not going to be released for months. If your code is relevant on 1.12.x and you want it to be released sooner, please rebase your pull request and change its target to 1.12.x.

@@ -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?

@ondrejmirtes
Copy link
Member Author

I realized the BC layer cannot work and instead, I'll write a new rule which makes these classes unknown in PHPStan-related code.

@ondrejmirtes ondrejmirtes deleted the bc-layer branch October 3, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants