hasDefinition($subscriberId)) { return; } $cacheAdaptersReferences = []; foreach ($container->getDefinitions() as $id => $definition) { if ($definition->isAbstract() || $definition->isSynthetic()) { continue; } if ($definition->getClass() !== PdoAdapter::class) { continue; } $cacheAdaptersReferences[] = new Reference($id); } $container->getDefinition($subscriberId) ->replaceArgument(0, $cacheAdaptersReferences); } }