Commit Graph

87 Commits

Author SHA1 Message Date
Simon Wisselink
e2e68b3622 clean output buffer for Throwable instead of just Exception (#797)
Fixes #514
2022-09-14 13:47:36 +02:00
Simon Wisselink
39b69f0142 Feature/php8 support (#629)
Adds support for PHP8.0, dropping support for PHP7.0 and below.

Backwards incompatible changes:
- Dropped support for php asp tags in templates (removed from php since php7.0)
- Dropped deprecated API calls that where only accessible through SmartyBC
- Dropped support for {php} and {include_php} tags and embedded PHP in templates. Embedded PHP will now be passed through as is.
- Removed all PHP_VERSION_ID and compare_version checks and conditional code blocks that are now no longer required
- Dropped deprecated SMARTY_RESOURCE_CHAR_SET and SMARTY_RESOURCE_DATE_FORMAT constants
- Dropped deprecated Smarty::muteExpectedErrors and Smarty::unmuteExpectedErrors API methods
- Dropped deprecated $smarty->getVariable() method. Use $smarty->getTemplateVars() instead.
- $smarty->registerResource() no longer accepts an array of callback functions

See the changelog for more details.

Switched CI from Travis to Github CI.
2021-10-13 12:15:17 +02:00
Matteo Galli
c7ee6a3333 Replace callback typehint with callable
`callback` is not a valid PHP type and makes static analysis tools failing
2019-08-14 09:34:42 +02:00
uwetews
4f7cd8f1b3 - reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483 2018-08-31 16:45:09 +02:00
uwetews
799b5cb342 - fix PSR-2 coding standards and PHPDoc blocks https://github.com/smarty-php/smarty/pull/452
https://github.com/smarty-php/smarty/pull/475
    https://github.com/smarty-php/smarty/pull/473
  - bugfix PHP5.2 compatibility https://github.com/smarty-php/smarty/pull/472
2018-08-19 02:35:46 +02:00
Sławomir Kaleta
2404095783 Update PSR-2 2018-06-12 09:58:15 +02:00
Uwe Tews
e2aec4d011 Fix annotation https://github.com/smarty-php/smarty/issues/441 2018-05-17 08:12:26 +02:00
Uwe Tews
3fc8abeb98 code cleanup and optimizations 3.1.32-dev-34 2017-11-06 01:02:56 +01:00
Uwe Tews
dd9c076dfa - correction of PHPDoc blocks
- minor code cleanup
2017-10-26 10:25:41 +02:00
Uwe Tews
428efa634d - bugfix modification of 9.8.2017 did fail on some recursive
tag nesting. https://github.com/smarty-php/smarty/issues/389
2017-10-07 09:05:54 +02:00
Uwe Tews
30526520b6 - cleanup of _getSmartyObj() 2017-08-05 23:08:59 +02:00
SvenRtbg
697df30d18 Fix typo in @method annotation
It's `setDefaultModifiers()`, not `setDefaultModifier()`
2017-02-14 22:48:26 +01:00
uwetews
27928ece9c - move template object cache into static variables 2016-11-23 17:12:38 +01:00
uwetews
2d2be8f57f - bugfix template function definitions array has not been cached between Smarty::fetch() and Smarty::display() calls
https://github.com/smarty-php/smarty/issues/301
2016-10-27 05:42:17 +02:00
uwetews
98efe22e02 - improvement/bugfix when Smarty::fetch() is called on a template object the inheritance and tplFunctions property
should be copied to the called template object
2016-10-23 18:48:17 +02:00
uwetews
d79edd2fe0 - improvement/bugfix when Smarty::fetch() is called on a template object the inheritance and tplFunctions property
should be copied to the called template object
2016-10-23 18:34:59 +02:00
uwetews
0a8e47ecb2 - improvement move often used code snippets into methods 2016-09-11 04:35:52 +02:00
uwetews
6ef0d0eaa0 - optimization and cleanup of resource code 2016-05-15 11:13:31 +02:00
uwetews
1fbf16afed - optimization of inheritance processing 2016-05-10 03:54:56 +02:00
uwetews
825aa26079 - bugfix template objects must be cached on $smarty->fetch('foo.tpl) calls incase the template is fetched
multiple times (forum topic 25909)
2016-03-01 00:54:33 +01:00
uwetews
b04486a091 - reformat all code for unique style 2016-02-09 01:27:15 +01:00
uwetews
a687a127c4 - bugfix if fetch('foo.tpl') is called on a template object the $parent parameter should default to the calling template object https://github.com/smarty-php/smarty/issues/152 2016-01-28 05:34:41 +01:00
uwetews
34062d45b7 - bugfix Smarty::error_reporting was not observed when display() or fetch() was called on template objects https://github.com/smarty-php/smarty/issues/145 2015-12-29 16:54:15 +01:00
uwetews
b0691dd056 - update external methods 2015-12-27 07:18:35 +01:00
uwetews
55f38125a4 - improve template scope handling 2015-10-29 22:17:35 +01:00
uwetews
50760c794c - more optimizations of template processing 2015-10-24 22:43:19 +02:00
uwetews
888014b908 - new extension handler to load functions when called 2015-10-24 05:02:24 +02:00
uwetews
fb9f2c9267 fix 2015-09-15 00:21:28 +02:00
uwetews
6ff3505a37 - move code of {call} processing back into Smarty_Internal_Template class 2015-09-14 23:50:20 +02:00
uwetews
2ba7109043 - move subtemplate code into runtime extension and optimize for size and speed 2015-09-01 02:27:22 +02:00
uwetews
0d46c17578 - rearrange internal cache 2015-08-29 14:37:59 +02:00
uwetews
6a26393099 - optimize rendering 2015-08-23 01:26:46 +02:00
uwetews
6cbcdf4d7b - load seldom used Smarty API methods dynamically to reduce memory footprint 2015-08-17 21:52:32 +02:00
uwetews
0260b525b8 introduce Smarty::$resource_cache_mode and cache template object of {include} inside loop 2015-08-10 21:57:06 +02:00
Uwe Tews
dd4cbfac3a - move registerObject / registerClass into extension 2015-06-21 13:43:17 +02:00
Uwe Tews
afe79aac2e - improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59 2015-06-19 03:21:52 +02:00
Uwe Tews
c5468b421e - optimization of resource class loading 2015-05-07 22:57:59 +02:00
Uwe Tews
af08353e93 - bugfix/improvement in 3.1.22-dev cache locking did not work as expected 2015-05-06 23:10:39 +02:00
Uwe Tews
8082bc7471 get rid of smarty object self pointer 2015-02-15 01:45:37 +01:00
Uwe Tews
75ad0b4da5 move default template handling into an extesion class 2015-01-02 10:48:07 +01:00
Uwe Tews
0a3579f9ca restructure template processing
Code was moved into classes it better belongs to.
This does reduce also Smarty's memory footprint
2015-01-02 09:12:01 +01:00
Uwe Tews
e8a77171d3 implement templateId generation as method 2015-01-01 22:27:45 +01:00
Uwe Tews
b013984dfd move properties into classes where they better belong to 2014-12-31 15:44:08 +01:00
Uwe Tews
e351c0123f move some code into Smarty_Internal_Debug class
where it better belongs to
2014-12-30 17:17:15 +01:00
Uwe Tews
6be6bf7b70 limit the template nesting level by security 2014-12-30 12:57:43 +01:00
Uwe Tews
ea9c681106 remove no longer needed code 2014-11-08 21:06:53 +01:00
Uwe Tews
158b7be58a Debug Console Update
- bugfix Debug Console did not show included subtemplates since 3.1.17
(forum 25301)
- bugfix Modifier debug_print_var did not limit recursion or prevent
recursive object display at Debug Console
(ATTENTION: parameter order has changed to be able to specify maximum
recursion)
- bugfix Debug consol did not include subtemplate information with
$smarty->merge_compiled_includes = true
- improvement The template variables are no longer displayed as objects
on the Debug Console
- improvement $smarty->createData($parent = null, $name = null) new
optional name parameter for display at Debug Console
- addition of some hooks for future extension of Debug Console
2014-11-03 22:27:32 +01:00
Uwe Tews
bc13ebbc9b -bugfix and enhancement on subtemplate {include} and template {function} tags.
* Calling a template which has a nocache section could fail if it was
called from a cached and a not cached subtemplate.
* Calling the same subtemplate cached and not cached with the
$smarty->merge_compiled_includes enabled could cause problems
* Many smaller related changes
2014-11-01 22:42:34 +01:00
Ilya Antipenko
95cc39deb6 Clean merge conflicts 2014-11-01 11:22:03 +02:00
Uwe Tews
21204c6613 Merge branch 'trunk' 2014-10-31 05:31:56 +01:00