Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[TypeInfo] Prevent interfaces extending BackedEnum to be treated as BackedEnums#61543
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[TypeInfo] Prevent interfaces extending BackedEnum to be treated as BackedEnums#61543
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedAug 27, 2025
Hey! To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done? Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review. Cheers! Carsonbot |
0539a1e toe1b4b24Comparee1b4b24 tofe49578CompareThank you@ettoredn. |
62eb019 intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Hi@nicolas-grekas, thanks for merging the PR. Should the change be included in the CHANGELOG-7.3.md? |
As it's a bug fix, it's not needed@ettoredn 🙂 |
Uh oh!
There was an error while loading.Please reload this page.
Given
TypeFactoryTrait.php::enum():249throws exceptionClass "DummyBackedEnumInterface" is not an enumtrying to get the backing type, which is not defined.This PR is meant as a fix. Upgrading to 7.3 broke my project because of this issue.
The open problem is how TypeInfo should handle BackedEnums that have no backing type defined. Besides interfaces, I'm not aware of any other way this can happen.
An alternative would be to extend
BackedEnumTypeto support undefined backing type.