Closed
Description
Symfony version(s) affected
>=5.4
Description
According to the docs:
Some of these adapters could be configured via shortcuts. Using these shortcuts will create pools with service IDs that follow the pattern cache.[type].
This is however not true, the services are not created and after checking the original PR I can confirm that this never worked as described. As a matter of fact, I not convinced this was ever meant to work as described. I believe this is a bug in the docs, but since I'm not 100% sure, I was hoping to get some feedback first.
How to reproduce
framework:
cache:
default_pdo_provider: 'pgsql:host=localhost;port=5432;dbname=postgres;user=postgres;password=pass'
#[AsCommand('app:test')]
class TestCommand extends Command
{
public function __construct(
#[Autowire(service: 'cache.pdo')] private CacheInterface $cache,
) {
parent::__construct();
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
return Command::SUCCESS;
}
}
The service "App\Command\TestCommand" has a dependency on a non-existent service "cache.pdo".
Did you mean this: "cache.app"?
Possible Solution
No response
Additional Context
No response