I’m in an yii2 development project.
I have RedisCache in config main.php components like this:
'cache' => [ 'class' => 'yii\redis\Cache', 'redis' => [ 'hostname' => '127.0.0.1', 'port' => 6379, 'database' => 0, ] ],
But it just is used for QA server, in local I want use FileCache as default of Yii so I overrided Cache config in main-local.php
'cache' => [ 'class' => 'yii\caching\FileCache', ],
=> Cannot override with ArrayHelper::merge because it still have property ‘redis’ in FileCache!! Should I replace ArrayHelper::merge by array_merge to fix this problem? But then I need to copy all config to main-local.php then just override which needed??
Which is the better?