You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
This overwrites the adapter name, but does not work: All the other, already given, options are being pushed to the blackhole adapter, but the corresponding methods like setCacheDir() don't exist there.
(The BlackHole adapter ist just an example, the problem would be the same if you had configured Memcache but want to use Filecache locally.)
So how do you correctly define adapters together with their options in your global config files so they still can be overwritten in local config files?
Thanks in advance, Estigy
The text was updated successfully, but these errors were encountered:
As I see it there are to possible solutions to this: Either we only push those options to the adapter that the adapter can handle, or we push all options to the adapter but ignore the not-known methods (via an empty __call() method).
zend-stdlib provides a way to remove configuration via the class Zend\Stdlib\ArrayUtils\MergeRemoveKey. As an example, in your local.php, you would write it as follows:
I have a cache configuration array (defined in some module config file) that is handed over to StorageFactory::factory():
Now if I want to use another adapter on my local development machine, I insert the following code into my
local.php
This overwrites the adapter name, but does not work: All the other, already given, options are being pushed to the blackhole adapter, but the corresponding methods like
setCacheDir()
don't exist there.(The BlackHole adapter ist just an example, the problem would be the same if you had configured Memcache but want to use Filecache locally.)
So how do you correctly define adapters together with their options in your global config files so they still can be overwritten in local config files?
Thanks in advance, Estigy
The text was updated successfully, but these errors were encountered: