Compare commits

...

5 Commits

Author SHA1 Message Date
Simon Wisselink 4fec27ccc2 fix release tooling to support/5 branch 2024-03-27 23:05:16 +01:00
Simon Wisselink fea0d02d99 version bump 2024-03-27 23:03:40 +01:00
Simon Wisselink 4efa427a87 Fix missing and bogus use lines in src/Smarty.php. (#970) 2024-03-27 22:55:23 +01:00
Wim Wisselink 30b1c5bf6d Deprecation fix for providing a non string value to ctype_digit (#960) 2024-03-27 22:55:23 +01:00
Markus Frühauf 3f871f9f7a Fix docblock information after Smarty 5 namespace changes (#968) 2024-03-27 22:55:23 +01:00
5 changed files with 23 additions and 17 deletions
+4
View File
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [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 -1
View File
@@ -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"
+15 -13
View File
@@ -2,6 +2,7 @@
namespace Smarty;
use FilesystemIterator;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use Smarty\Cacheresource\File;
@@ -12,11 +13,12 @@ use Smarty\Extension\CoreExtension;
use Smarty\Extension\DefaultExtension;
use Smarty\Extension\ExtensionInterface;
use Smarty\Filter\Output\TrimWhitespace;
use Smarty\Resource\BasePlugin;
use Smarty\Smarty\Runtime\CaptureRuntime;
use Smarty\Smarty\Runtime\ForeachRuntime;
use Smarty\Smarty\Runtime\InheritanceRuntime;
use Smarty\Smarty\Runtime\TplFunctionRuntime;
use Smarty\Runtime\CaptureRuntime;
use Smarty\Runtime\DefaultPluginHandlerRuntime;
use Smarty\Runtime\ForeachRuntime;
use Smarty\Runtime\InheritanceRuntime;
use Smarty\Runtime\TplFunctionRuntime;
/**
* Project: Smarty: the PHP compiling template engine
@@ -53,7 +55,7 @@ class Smarty extends \Smarty\TemplateBase {
/**
* smarty version
*/
const SMARTY_VERSION = '5.0.0';
const SMARTY_VERSION = '5.0.1';
/**
* define caching modes
@@ -1755,15 +1757,15 @@ class Smarty extends \Smarty\TemplateBase {
// Lazy load runtimes when/if needed
switch ($type) {
case 'Capture':
return $this->runtimes[$type] = new \Smarty\Runtime\CaptureRuntime();
return $this->runtimes[$type] = new CaptureRuntime();
case 'Foreach':
return $this->runtimes[$type] = new \Smarty\Runtime\ForeachRuntime();
return $this->runtimes[$type] = new ForeachRuntime();
case 'Inheritance':
return $this->runtimes[$type] = new \Smarty\Runtime\InheritanceRuntime();
return $this->runtimes[$type] = new InheritanceRuntime();
case 'TplFunction':
return $this->runtimes[$type] = new \Smarty\Runtime\TplFunctionRuntime();
return $this->runtimes[$type] = new TplFunctionRuntime();
case 'DefaultPluginHandler':
return $this->runtimes[$type] = new \Smarty\Runtime\DefaultPluginHandlerRuntime(
return $this->runtimes[$type] = new DefaultPluginHandlerRuntime(
$this->getDefaultPluginHandlerFunc()
);
}
@@ -2052,7 +2054,7 @@ class Smarty extends \Smarty\TemplateBase {
* @param array|string $modifiers modifier or list of modifiers
* to add
*
* @return \Smarty|Template
* @return Smarty
* @api Smarty::addDefaultModifiers()
*
*/
@@ -2131,7 +2133,7 @@ class Smarty extends \Smarty\TemplateBase {
* @throws \Smarty\Exception
*/
public function display($template = null, $cache_id = null, $compile_id = null) {
return $this->returnOrCreateTemplate($template, $cache_id, $compile_id)->display();
$this->returnOrCreateTemplate($template, $cache_id, $compile_id)->display();
}
/**
+2 -2
View File
@@ -377,9 +377,9 @@ abstract class TemplateBase extends Data {
* Registers a resource to fetch a template
*
* @param string $name name of resource type
* @param Smarty\Resource\Base $resource_handler instance of Smarty\Resource\Base
* @param \Smarty\Resource\BasePlugin $resource_handler instance of Smarty\Resource\BasePlugin
*
* @return \Smarty|\Smarty\Template
* @return \Smarty\Smarty|\Smarty\Template
* @link https://www.smarty.net/docs/en/api.register.resource.tpl
*
* @api Smarty::registerResource()
+1 -1
View File
@@ -66,7 +66,7 @@ function smarty_make_timestamp($string)
|| (interface_exists('DateTimeInterface', false) && $string instanceof DateTimeInterface)
) {
return (int)$string->format('U'); // PHP 5.2 BC
} elseif (strlen($string) === 14 && ctype_digit($string)) {
} elseif (strlen($string) === 14 && ctype_digit((string)$string)) {
// it is mysql timestamp format of YYYYMMDDHHMMSS?
return mktime(
substr($string, 8, 2),