Skip to content

[FrameworkBundle] Messenger requires Serializer #26905

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 1 commit into from

Conversation

boite
Copy link
Contributor

@boite boite commented Apr 12, 2018

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

The new Messenger component's integration with FrameworkBundle (c9cfda9) makes the latter depend on the Serializer component. This PR moves the dependency from require-dev to require in composer.json.

@sroze
Copy link
Contributor

sroze commented Apr 12, 2018

It actually isn't :).

@chalasr
Copy link
Member

chalasr commented Apr 12, 2018

The Messenger component is usable without the Serializer one, it's a soft dependency only. See #26649 which fixed an error when the serializer wasn't installed, should be all good now.

@sroze
Copy link
Contributor

sroze commented Apr 12, 2018

Though, we should work at making the error message clearer. I've already discussed this and I believe the best way is to have the serializer argument of the messenger.transport.serialize_message_with_type_in_headers as if-invalid="null" and throw an exception within the constructor of Symfony\Component\Messenger\Transport\Serialization\Serializer if $serializer is null. That way, we throw an exception if that default transport is used.

@sroze
Copy link
Contributor

sroze commented Apr 12, 2018

Thanks for the PR but as per our comments, I'm going to close this one.

@sroze sroze closed this Apr 12, 2018
@boite
Copy link
Contributor Author

boite commented Apr 12, 2018

ah, I see. I was getting this though:-

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 32:

  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]   
  The service "messenger.adapter.amqp.factory" has a dependency on a non-exis  
  tent service "messenger.transport.default_encoder".

@sroze
Copy link
Contributor

sroze commented Apr 12, 2018

It will be more explicit with #26908 :)

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