Skip to content

[Messenger] Add a simple serializer #28400

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

Merged
merged 1 commit into from
Sep 8, 2018

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 8, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR #...

When using the Messenger component without Symfony full stack, it helps to use a simple Serializer configured with the bare minimum (this bare minimum is up to the discussion).

@fabpot fabpot force-pushed the messenger-simple-serializer branch 2 times, most recently from 31a0ba0 to 4b1b74f Compare September 8, 2018 08:06
@fabpot fabpot requested a review from sroze September 8, 2018 08:06
@javiereguiluz
Copy link
Member

I haven't used the Messenger component yet so I'm probably asking something stupid but --> could we make a radical simplification for this "SimpleSerializer" and just use json_encode() / json_decode() instead of the Symfony Serializer?

@ro0NL
Copy link
Contributor

ro0NL commented Sep 8, 2018

random thought, but what about putting a SerializerInterface in the contracts namespace, and forget about individual encoder/decoder contracts perhaps (or move those as well).

@fabpot
Copy link
Member Author

fabpot commented Sep 8, 2018

It's a bit more involving than that, but having the serializer as a dependency does not add any complexity, so I don't think we need to make it optional. SimpleSerializer is only needed when you are using the component standalone where you would basically have to do what I've done here. So, it only to get you started faster.

@fabpot
Copy link
Member Author

fabpot commented Sep 8, 2018

@ro0NL That's my thoughts as well :)

@fabpot fabpot force-pushed the messenger-simple-serializer branch 3 times, most recently from 43696a2 to 1c5890a Compare September 8, 2018 11:57
Copy link
Contributor

@sroze sroze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 (rebase needed)

@fabpot fabpot force-pushed the messenger-simple-serializer branch from 1c5890a to f27c15a Compare September 8, 2018 12:15
@fabpot fabpot merged commit f27c15a into symfony:master Sep 8, 2018
fabpot added a commit that referenced this pull request Sep 8, 2018
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a simple serializer

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | #...

When using the Messenger component without Symfony full stack, it helps to use a simple Serializer configured with the bare minimum (this bare minimum is up to the discussion).

Commits
-------

f27c15a [Messenger] added a simple serializer
This was referenced Nov 3, 2018
@fabpot fabpot deleted the messenger-simple-serializer branch January 14, 2019 11:01
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.

5 participants