Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[12.x] Const to enum #53961
[12.x] Const to enum #53961
Changes from 23 commits
3a251cf
5bf6f69
dbf5145
86733fd
7ccc387
2ebb039
af63fdd
053c72a
7d04309
eaa84c0
8712ba9
01468a4
a7fd3e9
52ed299
a248b4e
27da74a
201a5e2
a8eca1b
935efcc
31cc1b3
7f0bda7
f49854a
4c17dcd
f44b034
e065656
a0a2ee9
41a889a
1b19e79
8ce6e6c
f384afd
c66a581
0e26932
76cc1d6
ddfacc2
2ddbab1
1df5098
4418d4f
f08f992
d4f76ad
eed57b8
d86d3ad
3c1ba5f
680036d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is scheduled for the next version, I would take the opportunity to move completely to the new approach, and document these changes.
But this is better to check with one of the maintainers. Maybe it is better to keep those for a smooth transition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your deprecation strategy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this also be a leftover? Or is the change from
static
toself
intentionally left as a part of this PR?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While reviewing this file, I also felt compelled to say this change was unnecessary.
But after some thinking, and considering your previous remark regarding when enums should be used versus when constants should be used, I thought that, even if the class isn't final, there is no point on reading these constants from subclasses, as they are basically hard-coded exit values from processes, and should not change.
Using
self::
instead ofstatic::
, improves -- IMO -- intention declaration and correctness in this case.