php-enqueue / enqueue-dev

Message Queue, Job Queue, Broadcasting, WebSockets packages for PHP, Symfony, Laravel, Magento. DEVELOPMENT REPOSITORY - provided by Forma-Pro
https://enqueue.forma-pro.com/
MIT License
2.17k stars 430 forks source link

Symfony config allow null #1263

Closed h0raz closed 2 years ago

h0raz commented 2 years ago

The symfony config reference states as default

transport:
    connection_factory_class: ~
    factory_service: ~

where ~ is null, but setting these values to null, throws an error, as the actual TransportFactory uses array_key_exists() which doesn't care if the value is null or not and in case sets e.g. the FactoryService to null which isn't supported

This change makes use of isset() and the Null Coalescing Operator which does also look up if the value is null