Commit Graph

194 Commits

Author SHA1 Message Date
Simon Wisselink
19ae410bf5 Merge pull request from GHSA-4h9c-v5vg-5m6m
* Prevent evasion of the static_classes security policy.

* Updated deprecated exception expectations.
2022-01-10 10:48:27 +01: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
Simon Wisselink
19ef8342aa Strip now removes whitespaces after comment (#582)
* Mark text sections as to be stripped, but do not strip them right away. Combine equivalent sections in chunks at the template level and strip combined chunks where possible.
- simplified Smarty_Internal_TemplateCompilerBase::processText along the way
Fixes #447
2020-04-13 22:27:42 +02:00
Vadim Kuragkovskiy
38b5ac72fa fix minor typo 2020-02-07 18:56:25 +02:00
uwetews
9301ba4bfc 09.10.2018
- bugfix fix of 26.8.2017 https://github.com/smarty-php/smarty/issues/327
   modifier is applied to sum expression https://github.com/smarty-php/smarty/issues/491
 - bugfix indexed arrays could not be defined "array(...)""
2018-10-09 03:34:34 +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
7a8607fe17 - PSR-2 code style fixes for config and template file Lexer/Parser generated with
the Smarty Lexer/Parser generator from https://github.com/smarty-php/smarty-lexer
    https://github.com/smarty-php/smarty/pull/483
2018-08-31 02:37:47 +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
0dbace8321 - new feature {parent} = {$smarty.block.parent} {child} = {$smarty.block.child} 2018-03-26 22:35:31 +02:00
Uwe Tews
40ea5d89da - replacement of " by ' 2017-11-20 12:26:48 +01:00
Uwe Tews
96fd914cc1 bugfix rework of newline spacing between tag code and template text.
now again identical with Smarty2 (forum topic 26878)
2017-11-20 04:07:51 +01:00
Uwe Tews
3799714d53 lexer/parser optimization 2017-11-05 20:04:32 +01:00
Uwe Tews
dd9c076dfa - correction of PHPDoc blocks
- minor code cleanup
2017-10-26 10:25:41 +02:00
Uwe Tews
3d7dece088 - bugfix custom delimiters could fail since modification of version 3.1.32-dev-23
https://github.com/smarty-php/smarty/issues/394
2017-10-21 13:14:14 +02:00
Uwe Tews
e4f41adf5a -bugfix fix implementation of unclosed block tag in double quoted string of 12.10.2017
https://github.com/smarty-php/smarty/issues/396 https://github.com/smarty-php/smarty/issues/397
    https://github.com/smarty-php/smarty/issues/391 https://github.com/smarty-php/smarty/issues/392
2017-10-18 09:40:38 +02:00
Uwe Tews
6b97d5cdd5 - unclosed block tag in double quted string must throw compiler exception.
https://github.com/smarty-php/smarty/issues/391 https://github.com/smarty-php/smarty/issues/392
2017-10-12 20:15:42 +02:00
Uwe Tews
b271173a2d bugfix $smarty.block.child and $smarty.block.parent could not be used like any
$smarty special variable https://github.com/smarty-php/smarty/issues/393
2017-10-12 08:21:12 +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
f90b449d21 - bugfix chained modifier failed when last modifier parameter is a signed value
https://github.com/smarty-php/smarty/issues/327
2017-08-26 11:47:41 +02:00
Uwe Tews
6a257a7ad3 - improvement repeated delimiter like {{ and }} will be treated as literal
https://groups.google.com/forum/#!topic/smarty-developers/h9r82Bx4KZw
2017-08-09 12:20:33 +02:00
Uwe Tews
418a1fd443 - improvement repeated delimiter like {{ and }} will be treated as literal
https://groups.google.com/forum/#!topic/smarty-developers/h9r82Bx4KZw
2017-08-09 11:15:33 +02:00
uwetews
5b508b7bf3 - bugfix nocache hash was not removed for <?xml ?> tags in subtemplates https://github.com/smarty-php/smarty/issues/300 2016-09-28 23:39:05 +02:00
uwetews
ec3a00e5ab - improvement new tags {block_parent} {block_child} in template inheritance 2016-09-20 16:00:28 +02:00
uwetews
b8acd7ea17 - bugfix some $smarty special template variables are no longer accessed as real variable.
using them on calls like {if isset($smarty.foo)} or {if empty($smarty.foo)} will fail
    http://www.smarty.net/forums/viewtopic.php?t=26222
2016-09-20 14:21:39 +02:00
uwetews
92945eaf12 - bugfix modifier on plugins like {plugin|modifier ... } did fail when the plugin does return an array https://github.com/smarty-php/smarty/issues/228 2016-07-18 17:57:50 +02:00
uwetews
5c1907052e fix class name case 2016-03-09 04:01:47 +01:00
uwetews
23acdf722c fix passed parameter 2016-03-09 03:53:12 +01:00
uwetews
0e5ea2a467 - bugfix instanceof expression in template code must be treated as value https://github.com/smarty-php/smarty/issues/191 2016-02-26 00:50:15 +01:00
uwetews
0f7f0d87b6 - new tag {make_nocache} read NEW_FEATURES.txt https://github.com/smarty-php/smarty/issues/110 2016-02-14 02:54:38 +01:00
uwetews
a8d3373f26 - improvement because of ambiguities the inline constant support has been removed from the $foo.bar syntax https://github.com/smarty-php/smarty/issues/149 2016-02-10 04:06:05 +01:00
uwetews
47237eb84f - bugfix wrong precedence on special if conditions like '$foo is ... by $bar' could cause wrong code https://github.com/smarty-php/smarty/issues/178 2016-02-10 03:19:25 +01:00
uwetews
b04486a091 - reformat all code for unique style 2016-02-09 01:27:15 +01:00
uwetews
c59ca44b9f - move some code from parser into compiler 2016-02-09 01:15:12 +01:00
uwetews
44eea98260 - bugfix regression when mdifier parameter was follow by math https://github.com/smarty-php/smarty/issues/132 2015-12-18 04:43:55 +01:00
uwetews
cc3f69a2a3 - update config file processing 2015-11-01 02:58:27 +01:00
uwetews
888014b908 - new extension handler to load functions when called 2015-10-24 05:02:24 +02:00
uwetews
757d66a731 parser: add support for template prefix and postfix code 2015-10-18 02:02:43 +02:00
uwetews
64464e8fbe - bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92 2015-09-19 19:55:14 +02:00
uwetews
620e52405b - improvement convert template inheritance into runtime processing
- bugfix {$smarty.block.parent} did always reference the root parent block https://github.com/smarty-php/smarty/issues/68
2015-09-01 01:54:28 +02:00
uwetews
6cbcdf4d7b - load seldom used Smarty API methods dynamically to reduce memory footprint 2015-08-17 21:52:32 +02:00
uwetews
5c9c57df7d replace property array by object properties 2015-08-09 21:14:16 +02:00
Uwe Tews
e1cc514a68 - avoid possible circular object referances caused by parser/lexer objects 2015-08-06 01:19:11 +02:00
Uwe Tews
bb3dfc6fdf - bugfix parser did hang on text starting <?something https://github.com/smarty-php/smarty/issues/74 2015-07-25 22:32:10 +02:00
Uwe Tews
52ced72361 - bugfix calling a plugin with nocache option but no other attributes like {foo nocache} caused call to undefined function https://github.com/smarty-php/smarty/issues/55 2015-06-18 00:06:40 +02:00
Uwe Tews
83f3f6d7f1 - bugfix an output tag with variable, modifier followed by an operator like {$foo|modifier+1} did fail https://github.com/smarty-php/smarty/issues/53 2015-06-14 04:23:50 +02:00
Uwe Tews
f1e1f56ffe - bugfix using {$foo} as array index like $bar.{$foo} or in double quoted string like "some {$foo} thing" failed https://github.com/smarty-php/smarty/issues/49 2015-06-08 23:54:46 +02:00
Uwe Tews
fa269d418f - bugfix <?xml ... ?> including template variables broken since 3.1.22 https://github.com/smarty-php/smarty/issues/47 2015-06-01 22:26:45 +02:00
Uwe Tews
0434f34bdd - bugfix if condition string 'neq' broken due to a typo https://github.com/smarty-php/smarty/issues/42 2015-05-24 18:37:53 +02:00
Uwe Tews
ec449734c3 - improvement on php_handling to allow very large PHP sections, better error handling
- improvement allow extreme large comment sections (forum 25538)
2015-05-23 18:56:00 +02:00