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

Resolve remaining predefined constants #693

Merged
merged 2 commits into from Jan 30, 2022
Merged

Resolve remaining predefined constants #693

merged 2 commits into from Jan 30, 2022

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Sep 29, 2021

Follow-up of #684

This resolves the remaining predefined constants that are configured via dynamicConstantNames and differ from what reflection is able to resolve.

There are a few constants that are defined via compilation flags where I was not a 100% sure if they can be empty or not.

And, of course, there would be many more constants from extensions that could be defined potentially and the resolving code could be refactored or grouped differently, but for now I wanted to keep it simple and adapt it based on the feedback I get.
Currently it's grouped/sorted like the following with links to docs

  • group of core constants
  • group of "other" core constants
  • constants grouped by extensions which are sorted alphabetically
  • constants inside groups are sorted as they occur in the linked docs

@herndlm
Copy link
Contributor Author

herndlm commented Oct 13, 2021

What do you think @ondrejmirtes and what about the remaining open conversations @staabm?

@herndlm
Copy link
Contributor Author

herndlm commented Jan 2, 2022

rebased and cleaned up a bit

@ondrejmirtes
Copy link
Member

Hi, I really don’t want to read 64 comments. Anything worth my attention before I review? 😊

@herndlm
Copy link
Contributor Author

herndlm commented Jan 13, 2022

Sorry for spaming you with the rebases (wanted to make the CI green again) :/

Most of it was about the PHP version constants (should we have upper limits or not). So a look/check/special think there might be worth when reviewing. The rest is resolved.

@herndlm herndlm mentioned this pull request Jan 29, 2022
This resolves the remaining predefined constants that are configured via `dynamicConstantNames` and differ from what reflection is able to resolve.
@ondrejmirtes ondrejmirtes merged commit da80c29 into phpstan:master Jan 30, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@herndlm herndlm deleted the feature/resolve-remaining-predefined-constants branch January 30, 2022 13:27
@herndlm
Copy link
Contributor Author

herndlm commented Jan 30, 2022

thx, I hope this doesn't introduce annoying new errors 🤞

@ondrejmirtes
Copy link
Member

I’ll /cc you if it does 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants