Skip to content

Commit

Permalink
Fixes yiisoft#17: Updated Composer constraints to reflect the fact th…
Browse files Browse the repository at this point in the history
…at it requires Smarty 3
  • Loading branch information
samdark committed Mar 18, 2017
1 parent 5c1fb3d commit 2773090
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Yii Framework 2 smarty extension Change Log
2.0.6 under development
-----------------------

- Bug #17: Fixed Smarty 2 compatibility (samdark)
- Bug #17: Updated Composer constraints to reflect the fact that it requires Smarty 3 (samdark)


2.0.5 March 17, 2016
Expand Down
9 changes: 1 addition & 8 deletions ViewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,7 @@ public function init()
{
$this->smarty = new Smarty();

if (method_exists($this->smarty, 'setCompileDir')) {
// Smarty 3
$this->smarty->setCompileDir(Yii::getAlias($this->compilePath));
} else {
// Smarty 2
$this->smarty->compile_dir = Yii::getAlias($this->compilePath);
}

$this->smarty->setCompileDir(Yii::getAlias($this->compilePath));
$this->smarty->setCacheDir(Yii::getAlias($this->cachePath));

foreach ($this->options as $key => $value) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"require": {
"yiisoft/yii2": "~2.0.0",
"smarty/smarty": "~3.1.0 | ~2.6.0"
"smarty/smarty": "~3.1.0"
},
"autoload": {
"psr-4": { "yii\\smarty\\": "" }
Expand Down

0 comments on commit 2773090

Please sign in to comment.