Zend\Cache\Service\StorageCacheFactory: Order of Redis adapter options may cause Exception #6381
Comments
I'll check this soon - it could affect other adapters as well. |
@Ocramius @mwillbanks @weierophinney This issue can only be fixed by overwrite the |
@marc-mabe tricky: eventually, the entire constructor could be re-defined to follow the expected order. |
@Ocramius The constructor is using the method |
I think this is expected behavior, but it's annoying and useless. |
@Ocramius So close as won't fix ? |
No, I think the logic can be hardened, but I'd eventually ask @eiwaen if he can provide a patch if this is needed. The point is that this will lead to other WTF moments for others, and even if it can be fixed by the user, it is probably not the best solution, being a usability inhibitor. |
ping @eiwaen |
This is obviously a bug. What are we supposed to do guess what order an unordered array of options should go in? At the very least, add a big note to the documentation so that people know the order matters and don't waste hours trying to figure out what's wrong. |
@eiwaen @lucian303 Should be "fixed" by zendframework/zend-cache#91 |
@Ocramius @weierophinney This one is fixed by zendframework/zend-cache#91 and can be closed |
by implementing possibility to AdapterOptions to prioritize options
by implementing possibility to AdapterOptions to prioritize options
by implementing possibility to AdapterOptions to prioritize options
by implementing possibility to AdapterOptions to prioritize options
by implementing possibility to AdapterOptions to prioritize options
by implementing possibility to AdapterOptions to prioritize options
Depending on the order of the adapter options, the following Exception may be thrown:
Zend\Cache\Exception\InvalidArgumentException' with message 'Missing required server host'
This works:
This doesn't work:
The text was updated successfully, but these errors were encountered: