Skip to content
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

fix: Set messenger.transports if config has not empty transports value #90

Conversation

ahonymous
Copy link
Contributor

@ahonymous ahonymous commented Aug 12, 2024

These changes fix the issue in BrefMessengerExtension::prepand() for applications with multiple configs in different environments.

In BrefMessengerExtension.php line 25:

Warning: Undefined array key "transports"

Example:

configs
|__ packages
    |__dev
    |    |__messenger.yaml
    |__prod
    |    |__messenger.yaml
    |__messenger.yaml     
# configs/messenger.yaml
...
framework:
    messenger:
        transports:
            default_bus:
                <transport-config>
        routing:
            App\Message\Message: default_bus
# configs/dev/messenger.yaml
...
framework:
    messenger:
        buses:
            <dev-buses-config>
# configs/prod/messenger.yaml
...
framework:
    messenger:
        buses:
            <prod-buses-config>

@ahonymous ahonymous force-pushed the bugfix/read-messenger-container-config-from-overrided-environment branch from 8cd28f9 to a9000a0 Compare August 12, 2024 15:24
@mnapoli
Copy link
Member

mnapoli commented Aug 12, 2024

Beautiful work thank you!

@mnapoli mnapoli merged commit a4ed7da into brefphp:master Aug 12, 2024
5 checks passed
@ahonymous ahonymous deleted the bugfix/read-messenger-container-config-from-overrided-environment branch August 12, 2024 20:21
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.

2 participants