Skip to content

Not allow null value for cache default_ttl #410

Closed
@tolean

Description

@tolean

Description
Have an error when try to set null value for cache config default_ttl.
Cache plugin support null value https://docs.php-http.org/en/latest/plugins/cache.html?highlight=cache#semantics-of-null-values
but bundle configuration except an integer value

Error message:

Invalid type for path "httplug.clients.***.plugins.0.cache.config.default_ttl". Expected "int", but got "null".
Hint: The default max age of a Response

How to reproduce

httplug:
    clients:
        bo_inner_api:
            factory: 'httplug.factory.symfony'
            plugins:
                - cache:
                      cache_pool: my_custom_cache_pull
                      config:
                            default_ttl: null
                            respect_response_cache_directives: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions