mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-04 04:24:18 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bbd09c7bfa | |||
| 52dc8adafb | |||
| 6f054ecc2f | |||
| 4fec27ccc2 | |||
| fea0d02d99 |
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [5.0.2] - 2024-03-28
|
||||
- Fix Smarty::assign() not returning $this when called with an array as first parameter [#972](https://github.com/smarty-php/smarty/pull/972)
|
||||
|
||||
|
||||
## [5.0.1] - 2024-03-27
|
||||
- Fix error in Smarty\Smarty::compileAllTemplates() by including missing FilesystemIterator class [#966](https://github.com/smarty-php/smarty/issues/966)
|
||||
|
||||
|
||||
## [5.0.0] - 2024-03-25
|
||||
- Fixed that scoped variables would overwrite parent scope [#952](https://github.com/smarty-php/smarty/issues/952)
|
||||
- Removed publicly accessible `$tpl->_var_stack` variable
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
- Fix error in Smarty\Smarty::compileAllTemplates() by including missing FilesystemIterator class [#966](https://github.com/smarty-php/smarty/issues/966)
|
||||
+1
-1
@@ -15,7 +15,7 @@ php utilities/update-smarty-version-number.php $1
|
||||
git add changelog CHANGELOG.md src/Smarty.php
|
||||
git commit -m "version bump"
|
||||
|
||||
git checkout master
|
||||
git checkout support/5
|
||||
git pull
|
||||
git merge --no-ff "release/$1"
|
||||
git branch -d "release/$1"
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ class Data
|
||||
foreach ($tpl_var as $_key => $_val) {
|
||||
$this->assign($_key, $_val, $nocache, $scope);
|
||||
}
|
||||
return;
|
||||
return $this;
|
||||
}
|
||||
switch ($scope ?? $this->getDefaultScope()) {
|
||||
case self::SCOPE_GLOBAL:
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Smarty extends \Smarty\TemplateBase {
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '5.0.0';
|
||||
const SMARTY_VERSION = '5.0.2';
|
||||
|
||||
/**
|
||||
* define caching modes
|
||||
|
||||
@@ -42,4 +42,15 @@ class AssignTest extends PHPUnit_Smarty
|
||||
$this->smarty->assign(array('foo' => 'bar', 'foo2' => 'bar2'));
|
||||
$this->assertEquals('bar bar2', $this->smarty->fetch('eval:{$foo} {$foo2}'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that assign returns this.
|
||||
*/
|
||||
public function testAssignReturnsThis()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'data',
|
||||
$this->smarty->assign(['dummy' => 'data'])->fetch('eval:{$dummy}')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user