diff --git a/extensions/smarty/yii/smarty/ViewRenderer.php b/extensions/smarty/yii/smarty/ViewRenderer.php index d8c5d30..164ae8c 100644 --- a/extensions/smarty/yii/smarty/ViewRenderer.php +++ b/extensions/smarty/yii/smarty/ViewRenderer.php @@ -26,12 +26,12 @@ class ViewRenderer extends BaseViewRenderer /** * @var string the directory or path alias pointing to where Smarty cache will be stored. */ - public $cachePath = '@app/runtime/Smarty/cache'; + public $cachePath = '@runtime/Smarty/cache'; /** * @var string the directory or path alias pointing to where Smarty compiled templates will be stored. */ - public $compilePath = '@app/runtime/Smarty/compile'; + public $compilePath = '@runtime/Smarty/compile'; /** * @var Smarty diff --git a/extensions/twig/yii/twig/ViewRenderer.php b/extensions/twig/yii/twig/ViewRenderer.php index 7498d86..76bee95 100644 --- a/extensions/twig/yii/twig/ViewRenderer.php +++ b/extensions/twig/yii/twig/ViewRenderer.php @@ -25,7 +25,7 @@ class ViewRenderer extends BaseViewRenderer /** * @var string the directory or path alias pointing to where Twig cache will be stored. */ - public $cachePath = '@app/runtime/Twig/cache'; + public $cachePath = '@runtime/Twig/cache'; /** * @var array Twig options diff --git a/framework/yii/base/Application.php b/framework/yii/base/Application.php index 95993a4..495c1f8 100644 --- a/framework/yii/base/Application.php +++ b/framework/yii/base/Application.php @@ -102,11 +102,17 @@ class Application extends Module Yii::setAlias('@app', $this->getBasePath()); unset($config['basePath']); + if (isset($config['vendor'])) { + $this->setVendorPath($config['vendor']); + unset($config['vendorPath']); + } + Yii::setAlias('@vendor', $this->getVendorPath()); + if (isset($config['runtime'])) { $this->setRuntimePath($config['runtime']); unset($config['runtime']); } - Yii::setAlias('@app/runtime', $this->getRuntimePath()); + Yii::setAlias('@runtime', $this->getRuntimePath()); if (isset($config['timeZone'])) { $this->setTimeZone($config['timeZone']); diff --git a/framework/yii/caching/FileCache.php b/framework/yii/caching/FileCache.php index 8d6a704..a15751e 100644 --- a/framework/yii/caching/FileCache.php +++ b/framework/yii/caching/FileCache.php @@ -27,7 +27,7 @@ class FileCache extends Cache * @var string the directory to store cache files. You may use path alias here. * If not set, it will use the "cache" subdirectory under the application runtime path. */ - public $cachePath = '@app/runtime/cache'; + public $cachePath = '@runtime/cache'; /** * @var string cache file suffix. Defaults to '.bin'. */