-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Getter for extra attributes in ExtraAttributesException #24277
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
Conversation
* {@inheritdoc} | ||
* | ||
* @param array $extraAttributes Extra attributes that are not allowed | ||
* @param \Exception $previous Previous exception |
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.
This docblock isn't much useful, so it can be reverted.
/** | ||
* Extra attributes. | ||
* | ||
* @var array |
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.
Same. The constructor already typehints the $extraAttributes
argument, and the name is self explanatory :)
Thank you @mdeboer. |
…butesException (mdeboer) This PR was squashed before being merged into the 3.4 branch (closes #24277). Discussion ---------- [Serializer] Getter for extra attributes in ExtraAttributesException | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes (failure unrelated) | Fixed tickets | | License | MIT This PR adds a public getter for the extra attributes in `ExtraAttributesException` and makes it easier to create custom exception messages (e.g. JSON formatted). Commits ------- cb935e7 [Serializer] Getter for extra attributes in ExtraAttributesException
This PR adds a public getter for the extra attributes in
ExtraAttributesException
and makes it easier to create custom exception messages (e.g. JSON formatted).