sroze / messenger-enqueue-transport

Uses Enqueue with Symfony's Messenger component.
MIT License
191 stars 55 forks source link

Symfony framework bundle incompatibility (version >= 4.3.3) #85

Closed serhiifom closed 5 years ago

serhiifom commented 5 years ago

Symfony developers have added an extra option called transport_name to $options parameter of the transport factory implementations. Code reference: https://github.com/symfony/framework-bundle/blob/master/DependencyInjection/FrameworkExtension.php#L1616

Therefore, when I try to update, the instance of \Enqueue\MessengerAdapter\QueueInteropTransport produces an error:

Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException: The option "transport_name" does not exist. Defined options are: "delayStrategy", "deliveryDelay", "priority", "queue", "receiveTimeout", "timeToLive", "topic".

/proj/vendor/symfony/options-resolver/OptionsResolver.php:796
/proj/vendor/sroze/messenger-enqueue-transport/QueueInteropTransport.php:54
/proj/vendor/sroze/messenger-enqueue-transport/QueueInteropTransportFactory.php:60
/proj/vendor/symfony/messenger/Transport/TransportFactory.php:38

I see two possible solutions here:

  1. Allow this particular option, make it optional with setDefined() method
  2. Allow any custom option as described here https://github.com/symfony/symfony/issues/7979 Let me know what option is more preferable, and I can do a PR to fix this.
Steveb-p commented 5 years ago

This incompatibility was resolved in #82.

serhiifom commented 5 years ago

Oh, sorry! Didn't notice that. Thanks!

Steveb-p commented 5 years ago

@sergeyfom no worries, just remember to update the adapter ;)