Bug Report
| Q |
A |
| Version(s) |
* since it was added |
Summary
The README.md example does not work due to the lack of the ConfigProvider of the memory adapter being passed to the ConfigAggregator.
Current behavior
Execution will fail, Memory adapter is not retrievable.
How to reproduce
use Laminas\Cache\ConfigProvider;
use Laminas\Cache\Service\StorageAdapterFactoryInterface;
use Laminas\Cache\Storage\Adapter\Memory;
use Laminas\ConfigAggregator\ConfigAggregator;
use Laminas\ServiceManager\ServiceManager;
$config = (new ConfigAggregator([
ConfigProvider::class,
]))->getMergedConfig();
$dependencies = $config['dependencies'];
$container = new ServiceManager($dependencies);
/** @var StorageAdapterFactoryInterface $storageFactory */
$storageFactory = $container->get(StorageAdapterFactoryInterface::class);
$storage = $storageFactory->create(Memory::class); // ServiceNotFoundException
Expected behavior
$storage variable contains an instance of the Memory adapter.
Bug Report
Summary
The
README.mdexample does not work due to the lack of theConfigProviderof the memory adapter being passed to theConfigAggregator.Current behavior
Execution will fail, Memory adapter is not retrievable.
How to reproduce
Expected behavior
$storagevariable contains an instance of theMemoryadapter.