Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle] Incompatible use of dynamic environment variables when configuring framework.cache.default_redis_provider #20850

Copy link
Copy link
Closed
@robinvdvleuten

Description

@robinvdvleuten
Issue body actions

Hi there,

When I am trying to configure the default cache provider for the new cache implementation;

parameters:
    env(REDIS_URL): 'redis://localhost'

framework:
    cache:
        default_redis_provider: "%env(REDIS_URL)%"
        pools:
            cache.tickets:
                adapter: cache.adapter.redis
                default_lifetime: 300 # 5 minutes in seconds

I get the following exception when clearing the cache;

[Symfony\Component\DependencyInjection\Exception\EnvParameterException]             
Incompatible use of dynamic environment variables "REDIS_URL" found in parameters.
                                                                                                                                                                                    
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]                  
The service "cache.tickets" has a dependency on a non-existent service "%env(REDIS_URL)%".  

Which is a bit strange as it seems to look like a very good use case of using the new env functionality to me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.