Skip to content

Symfony config allow null #1263

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 2 commits into from
Jul 20, 2022
Merged

Symfony config allow null #1263

merged 2 commits into from
Jul 20, 2022

Conversation

h0raz
Copy link
Contributor

@h0raz h0raz commented Jul 19, 2022

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

@makasim makasim merged commit 941d4c8 into php-enqueue:master Jul 20, 2022
@h0raz h0raz deleted the symfony_config_allow_null branch July 20, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants