Skip to content

How to disable a plugin on a specific client in a specific environment ? #306

Closed
@shulard

Description

@shulard
Q A
Bug? no
New Feature? no
Version 1.13.1

I have some specific dev env logging features enabled in my Symfony project (full message formatter, specific log channel). In the test environment I want to fully disable the logging.

Actual Behavior

When I ran the code in test, the Symfony container can't compile because of invalid logger plugin configuration.

Expected Behavior

Since I disable the logger plugin in the test env, why is it still trying to load it ?

Steps to Reproduce

Here are the Yaml files used :

# on dev
httplug:
    plugins:
        logger:
            logger: monolog.logger.http
            formatter: http.client.full-formatter
    clients:
        dicom_query:
            plugins:
                - 'httplug.plugin.content_length'
                - 'httplug.plugin.redirect'
                - 'httplug.plugin.logger'
# on test
httplug:
    plugins:
        logger:
            enabled: false

I though that disabling the plugin in test will disable the plugin for all the clients but I got an error in the container regarding the plugin configuration. Also when I dump the config for my test environment I saw that the plugin is still defined in the dicom_query plugin list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions