Closed 0x6368 closed 5 years ago
I am still having issues with the command. When I run it, it seems like the BaseCacheCommand
constructor gets called four times. The first two times, CacheManagerInterface
is set, but the second two times it is null
. Because of this, the BaseCacheCommand
tries to
https://github.com/sonata-project/SonataCacheBundle/blob/13dbbb6b428a4062914ff8a37f14af2a7aa66742/src/Command/BaseCacheCommand.php#L46, which crashes with the error
The "Sonata\Cache\CacheManagerInterface" 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 depend
ency injection instead.
Can you try to provide a PR with a fix?
Environment
dev and prod
Sonata packages
Symfony packages
PHP version
Subject
The
sonata.cache.manager
service is private, so I cannot flush the cache withphp bin/console sonata:cache:flush-all
Steps to reproduce
php bin/console sonata:cache:flush-all
Expected results
The cache being cleared.
Actual results