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

cache:pool:clear --all command fails in a prod environment #53551

Copy link
Copy link
Closed
@LiquidPL

Description

@LiquidPL
Issue body actions

Symfony version(s) affected

7.0.2, 6.4.2

Description

When trying to clear cache pools using the cache:pool:clear --all command while in a production environment (i.e. APP_ENV=prod), the command fails with the following error on Symfony 6.4:

In Container.php line 249:
                                                                                                                                                                                                              
  The "cache.annotations" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection   
  instead.                                                                                                                                                                                                    
                                                                                                                                                                                                              

cache:pool:clear [--all] [--exclude EXCLUDE] [--] [<pools>...]

Failed to execute command bin/console cache:pool:clear --all: exit status 1

And on Symfony 7.0:

In Container.php line 240:
                                                                                                                                                                                                               
  The "cache.asset_mapper" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection   
  instead.                                                                                                                                                                                                     
                                                                                                                                                                                                               

cache:pool:clear [--all] [--exclude EXCLUDE] [--] [<pools>...]

Failed to execute command bin/console cache:pool:clear --all: exit status 1

Both of these happen only in the prod env, the dev env works perfectly fine.

How to reproduce

  1. Create a new webapp installation of the app from symfony/skeleton.
  2. Change APP_ENV to prod.
  3. Attempt to run the cache:pool:clear --all command.

Possible Solution

No response

Additional Context

No response

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.