We are running Shopware 6, a Symfony 5 application.
For the web requests, we use APCu as cache adapter. It was enabled in the config file config/packages/framework.yaml like so
framework:
cache:
app: cache.adapter.apcu
However on the CLI, APCu is not enabled in the PHP config, so we can't use it there, but when we run CLI scripts (using php bin/console ...), Symfony uses the same config and tries to use the APCu cache, which results in warnings and in case of bin/console cache:clear even in a fatal error.
Is there a way to override the Symfony config specifically for console requests? I read the docs about Symfony Config but that mostly refers to different environment configs using .env files, not differing configs dependant on web request or console request.