app/library/Services.php: in _initSharedModelsMetadata() must pass a factory to adapter in phalcon 4
This commit is contained in:
parent
d7af32a1d7
commit
e56c8f37ea
1 changed files with 5 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ use Phalcon\Di\FactoryDefault as DiDefault,
|
|||
Phalcon\Cache\Backend\Apc as BackendApcCache,
|
||||
Phalcon\Translate\Adapter\NativeArray as TranslateAdapter,
|
||||
Phalcon\Storage\AdapterFactory as StorageAdapterFactory,
|
||||
Phalcon\Cache\AdapterFactory as CacheAdapterFactory,
|
||||
Phalcon\Logger,
|
||||
Phalcon\Mvc\Router;
|
||||
|
||||
|
|
@ -178,8 +179,11 @@ class Services extends DiDefault
|
|||
$options = $mdConfig['options'];
|
||||
$adapter = $mdConfig['adapter'];
|
||||
|
||||
$serializerFactory = new \Phalcon\Storage\SerializerFactory();
|
||||
$factory = new CacheAdapterFactory($serializerFactory);
|
||||
|
||||
$class = 'Phalcon\Mvc\Model\MetaData\\' . $adapter;
|
||||
return new $class($options);
|
||||
return new $class($factory, $options);
|
||||
}
|
||||
|
||||
// Otherwise, default to Memory.
|
||||
|
|
|
|||
Reference in a new issue