Skip to content

Making the serializer configurable by transport #30628

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
Mar 31, 2019

Conversation

weaverryan
Copy link
Member

@weaverryan weaverryan commented Mar 21, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets #30293 (already closed, but I don't think this was reasonably possible before)
License MIT
Doc PR TODO - as many of the new messenger PRs will be done at once

Use cases:

  • Messenger - Use different Serializer #30293
  • Transport A will be consumed by your Symfony app (so native php serialization is cool) but transport B will be consumed by another app, so you want to serialize as JSON
  • Upgrading from Symfony 4.2 to 4.3. The change to the PhpSerialize means that messages that were sent to the queue on 4.2, will fail on 4.3. The solution is to use the old serializer in your config. This would allow you to make your existing transport use the old serializer, then migrate to a new transport using the new serializer (then remove the old one later).

Thanks!

@weaverryan weaverryan force-pushed the messenger-serializer-by-transport branch 2 times, most recently from e7ae82e to 79425a3 Compare March 21, 2019 15:45
@weaverryan
Copy link
Member Author

Ready to go again

Status: Needs review

@weaverryan
Copy link
Member Author

Rebased and ready!

@weaverryan weaverryan force-pushed the messenger-serializer-by-transport branch from 44c9e38 to 7b66e39 Compare March 31, 2019 14:50
@fabpot fabpot force-pushed the messenger-serializer-by-transport branch from 7b66e39 to ef6f23e Compare March 31, 2019 14:54
@fabpot
Copy link
Member

fabpot commented Mar 31, 2019

Thank you @weaverryan.

@fabpot fabpot merged commit ef6f23e into symfony:master Mar 31, 2019
fabpot added a commit that referenced this pull request Mar 31, 2019
…rryan)

This PR was merged into the 4.3-dev branch.

Discussion
----------

Making the serializer configurable by transport

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30293 (already closed, but I don't think this was reasonably possible before)
| License       | MIT
| Doc PR        | TODO - as many of the new messenger PRs will be done at once

Use cases:
* #30293
* Transport A will be consumed by your Symfony app (so native php serialization is cool) but transport B will be consumed by another app, so you want to serialize as JSON
* Upgrading from Symfony 4.2 to 4.3. The change to the `PhpSerialize` means that messages that were sent to the queue on 4.2, will fail on 4.3. The solution is to use the old serializer in your config. This would allow you to make your existing transport use the old serializer, then migrate to a new transport using the new serializer (then remove the old one later).

Thanks!

Commits
-------

ef6f23e Making the serializer configurable by transport
@weaverryan weaverryan deleted the messenger-serializer-by-transport branch March 31, 2019 15:33
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
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.

6 participants