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

Remove undefined constants from scope #1534

Merged
merged 1 commit into from Jul 21, 2022

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Jul 20, 2022

Constants are currently added to the scope if e.g. defined() is used and passed around, but never removed anymore. Which this PR changes.

The constants are added to the scope via

(Specified)Type-wise this doesn't change anything, but ConstantRule explicitly verifies if a constant is in the scope and not which type it has. And this rule is working a bit better now I think.

@herndlm herndlm force-pushed the remove-undefined-constants branch from 2d99436 to 0502b82 Compare July 20, 2022 20:58
@herndlm herndlm marked this pull request as ready for review July 20, 2022 21:45
@ondrejmirtes ondrejmirtes merged commit 4a5eac1 into phpstan:1.8.x Jul 21, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@herndlm herndlm deleted the remove-undefined-constants branch July 21, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants