sroze/messenger-enqueue-transport

Symfony framework bundle incompatibility (version >= 4.3.3)

serhiifom opened this issue · 3 comments

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 symfony/symfony#7979
    Let me know what option is more preferable, and I can do a PR to fix this.

This incompatibility was resolved in #82.

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

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