Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Security] AccountStatusException::$user should be nullable#44259
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
[Security] AccountStatusException::$user should be nullable#44259
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedNov 24, 2021
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
carsonbot commentedNov 25, 2021
Hey! I think@rfaivre has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
nicolas-grekas commentedDec 15, 2021
Changing the public API looks wrong to me. Your child class should call |
derrabus commentedDec 15, 2021
The type declaration has been removed from the 6.0 branch already which also explains the merge conflict, GitHub reports. @nicolas-grekas I think, this error is raised if we attempt to serialize an instance of this class without setting a user. The instance would kind-of be in an invalid state without the user, but the error message that is triggered is probably not helpful. |
stof commentedDec 15, 2021
the error also happens if someone calls the getter on an exception on which the setter has not been called. |
derrabus commentedDec 15, 2021
Yes. And this basically tells us that the I think, we have two options here:
Either way, on 6.1 we would need to fix the serialization. I don't think that we should rais an exception when serializing/deserializing this class, even if it's in an invalid state. |
nicolas-grekas commentedFeb 13, 2022
Thank you@acantepie. |
Uh oh!
There was an error while loading.Please reload this page.
This PR fix error when throw an excepion extending
AccountStatusException(CustomUserMessageAccountStatusExceptionfor example)