Skip to content

[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

Closed
wants to merge 4 commits into from

Conversation

mdeboer
Copy link
Contributor

@mdeboer mdeboer commented Sep 21, 2017

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).

@mdeboer mdeboer changed the title Extraattributesexception [Serializer] Getter for extra attributes in ExtraAttributesException Sep 21, 2017
@mdeboer mdeboer changed the base branch from master to 3.4 September 21, 2017 13:03
* {@inheritdoc}
*
* @param array $extraAttributes Extra attributes that are not allowed
* @param \Exception $previous Previous exception
Copy link
Contributor

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
Copy link
Contributor

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 :)

@ogizanagi ogizanagi added this to the 3.4 milestone Sep 21, 2017
@ogizanagi
Copy link
Contributor

Thank you @mdeboer.

ogizanagi added a commit that referenced this pull request Sep 22, 2017
…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
@ogizanagi ogizanagi closed this Sep 22, 2017
This was referenced Oct 18, 2017
@mdeboer mdeboer deleted the extraattributesexception branch May 3, 2018 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants