-
Notifications
You must be signed in to change notification settings - Fork 665
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
Backed enum value changed to Atomic instead of scalar int or strings #10165
Backed enum value changed to Atomic instead of scalar int or strings #10165
Conversation
a99da7c
to
06a3a02
Compare
Since there are no BC breaks, you can target |
4f95db3
to
5ba7c26
Compare
@weirdan the target branch is changed |
On second thought, the following would break: fn(EnumCaseStorage $s): int|string|null { return $s->value; } It looks like I relied on automated checks too much. I've changed the target branch back to |
src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php
Show resolved
Hide resolved
if ($enum_case_storage->value instanceof TLiteralString | ||
|| $enum_case_storage->value instanceof TLiteralInt) { |
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.
if ($enum_case_storage->value instanceof TLiteralString | |
|| $enum_case_storage->value instanceof TLiteralInt) { | |
if ($enum_case_storage->value !== null) { |
9312fc3
to
76f03cc
Compare
Thanks! |
Closes #9938