Skip to content
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

[Serializer] Improve messages for unexpected resources values #34144

Merged

Conversation

@fancyweb
Copy link
Contributor

fancyweb commented Oct 27, 2019

Q A
Branch? 3.4
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Before: An unexpected value could not be serialized: NULL - very misleading

After: An unexpected value could not be serialized: a "stream" resource

@fancyweb fancyweb requested a review from dunglas as a code owner Oct 27, 2019
@fancyweb fancyweb force-pushed the fancyweb:serializer-better-message-for-resources branch from e26d257 to fe54704 Oct 27, 2019
@OskarStark

This comment has been minimized.

Copy link
Contributor

OskarStark commented Oct 28, 2019

What about:

An unexpected value (“stream”) could not be serialized.

It reads more fluently

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Oct 28, 2019
@fancyweb

This comment has been minimized.

Copy link
Contributor Author

fancyweb commented Oct 28, 2019

@OskarStark It might be read it as the stream string. We could have a new sentence for resources but I wanted to keep the same for simplicity.

Copy link
Member

nicolas-grekas left a comment

with a minor proposal

@fancyweb fancyweb force-pushed the fancyweb:serializer-better-message-for-resources branch from fe54704 to ad2ce27 Oct 29, 2019
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Oct 30, 2019

Thank you @fancyweb.

nicolas-grekas added a commit that referenced this pull request Oct 30, 2019
…ues (fancyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Improve messages for unexpected resources values

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Before: `An unexpected value could not be serialized: NULL` - very misleading

After: `An unexpected value could not be serialized: a "stream" resource`

Commits
-------

ad2ce27 [Serializer] Improve messages for unexpected resources values
@nicolas-grekas nicolas-grekas merged commit ad2ce27 into symfony:3.4 Oct 30, 2019
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details
@fancyweb fancyweb deleted the fancyweb:serializer-better-message-for-resources branch Oct 30, 2019
This was referenced Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.