Commit Graph

76 Commits

Author SHA1 Message Date
Simon Wisselink
c7a271323b Using unsupported PHP functions and unregistered static class methods in modifiers and expressions now triggers a deprecation notice
* Using unsupported PHP functions and unregistered static class methods in modifiers and expressions now triggers a deprecation notice because we will drop support for this in the next major release
2024-03-18 14:44:29 +01:00
Simon Wisselink
254b5cabee Dropped remaining references to removed PHP-support in Smarty 4 from docs, lexer and security class. 2022-09-27 12:21:01 +02:00
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
92e05d4f8d Brought lexer source functionally up-to-date with compiled version (#625)
Fixes #621
2021-01-07 00:26:28 +01:00
uwetews
7f531f6a44 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:36:14 +02:00
uwetews
a6cb648dfc - bugfix large plain text template sections without a Smarty tag > 700kB could
could fail in version 3.1.32 and 3.1.33 because PHP preg_match() restrictions
    https://github.com/smarty-php/smarty/issues/488
2018-09-18 04:46:30 +02:00
uwetews
7b64226e16 - reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483 2018-08-31 16:46:20 +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
Uwe Tews
cf22e986c0 - new feature {parent} = {$smarty.block.parent} {child} = {$smarty.block.child} 2018-03-28 07:14:29 +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
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
b0ea1cb5df Improve extension handler 2017-10-07 08:20:18 +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
511773ce6b - improvement repeated delimiter like {{ and }} will be treated as literal
https://groups.google.com/forum/#!topic/smarty-developers/h9r82Bx4KZw
2017-08-09 12:58:47 +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
klemens
51a0e764e8 spelling fixes 2017-04-08 12:10:39 +02:00
uwetews
b745a31a2d fixed spelling chilek commented on c4746e9 2016-11-11 21:17:32 +01:00
uwetews
c4746e9080 - optimization of lexer speed https://github.com/smarty-php/smarty/issues/311 2016-11-07 03:08:11 +01: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
04301645d6 - bugfix compiling of templates failed when the Smarty delimiter did contain '/' https://github.com/smarty-php/smarty/issues/264 2016-08-05 01:00:51 +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
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
c59ca44b9f - move some code from parser into compiler 2016-02-09 01:15:12 +01:00
uwetews
7eb56ac5e3 - bugfix plugin names starting with "php" did not compile https://github.com/smarty-php/smarty/issues/147 2015-12-30 22:11:15 +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
e0fc310b6e -bugfix a left delimter like '[%' did fail on [%$var_[%$variable%]%] (forum topic 25798) 2015-11-25 21:19:23 +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
788566cf70 - bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92 (reverted from commit 428e667453) 2015-10-08 19:53:25 +02:00
uwetews
428e667453 - bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92 2015-10-08 19:47: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
Uwe Tews
e1cc514a68 - avoid possible circular object referances caused by parser/lexer objects 2015-08-06 01:19:11 +02:00
Uwe Tews
9986286af0 - bugfix resolve naming conflict between custom Smarty delimiter '<%' and PHP ASP tags https://github.com/smarty-php/smarty/issues/64 2015-06-27 16:09:50 +02:00