How solve “Service templateCacheStorage is deprecated”

Notice: This thread is very old.
alnux
Member | 139
+
0
-

I just install kdyby/translator and it get me a deprecatet cachestorage when i put a translator inject on Basepresenter.php, im usung nette 2.2.1 where that service is deprecated

/** @var \Kdyby\Translation\Translator */
    protected $translator;

    public function injectTranslator(\Kdyby\Translation\Translator $translator)
    {
        $this->translator = $translator;
    }

the debuger show me this from cache service generate php file

/**
371:         * @return Nette\Caching\Storages\PhpFileStorage
372:         */
373:        public function createServiceNette__templateCacheStorage()
374:        {
375:            $service = new Nette\Caching\Storages\PhpFileStorage('E:\\Nube\\Proyectos\\Inicio\\app/../temp/cache', $this->getService('nette.cacheJournal'));
376:            trigger_error('Service templateCacheStorage is deprecated.', 16384);
377:            return $service;
378:        }

Last edited by alnux (2014-06-16 01:20)

Quinix
Member | 108
+
+1
-

You should use version 2.0 of Kdyby/Translation, which is compatible with Nette 2.2.

composer require kdyby/translation:~2.0