Skip to content

Commit

Permalink
update smarty to 3.1.33 (not testing)
Browse files Browse the repository at this point in the history
  • Loading branch information
osben committed May 26, 2019
1 parent 1876db6 commit aa68b3a
Show file tree
Hide file tree
Showing 224 changed files with 10,524 additions and 11,047 deletions.
22 changes: 0 additions & 22 deletions Smarty/.gitattributes

This file was deleted.

221 changes: 0 additions & 221 deletions Smarty/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions Smarty/.travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions Smarty/COMPOSER_RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ To retrieve the development and documentation folders add
"smarty/smarty-dev": "~3.1@dev"
}

If you are using (include) the composer generated autoloader.php which is located
in the /vendor folder it is no longer needed to require the Smarty.class.php file.
29 changes: 22 additions & 7 deletions Smarty/INHERITANCE_RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
3.1.3"
New tags for inheritance parent and chilD
{parent} == {$smarty.block.parent}
{child} == {$smarty.block.child}
Both tags support the assign attribute like
{child assign=foo}

3.1.31
New tags for inheritance parent and child
{block_parent} == {$smarty.block.parent}
{block_child} == {$smarty.block.child}

Since 3.1.28 you can mix inheritance by extends resource with the {extends} tag.
A template called by extends resource can extend a subtemplate or chain buy the {extends} tag.
Since 3.1.31 this feature can be turned off by setting the new Smarty property Smarty::$extends_recursion to false.

3.1.28
Starting with version 3.1.28 template inheritance is no longer a compile time process.
All {block} tag parent/child relations are resolved at run time.
This does resolve all known existing restrictions (see below).
Expand Down Expand Up @@ -37,8 +54,8 @@ Any code outside root {block} tags in child templates is now executed but any ou
....
{/block}

Starting with 3.1.28 you can mix inheritance by extends resuorce with the {extends} tag.
A template called by extends resoure can extend a subtemple or chain buy the {extends} tag.
Starting with 3.1.28 you can mix inheritance by extends resource with the {extends} tag.
A template called by extends resource can extend a subtemplate or chain buy the {extends} tag.

NOTE There is a BC break. If you used the extends resource {extends} tags have been ignored.

Expand All @@ -52,7 +69,7 @@ the compiled code of {include} subtemplates gets also merged in compiled inherit
Merging the code into a single compile template has some drawbacks.
1. You could not use variable file names in {include} Smarty would use the {include} of compilation time.
2. You could not use individual compile_id in {include}
3. Seperate caching of subtemplate was not possible
3. Separate caching of subtemplate was not possible
4. Any change of the template directory structure between calls was not necessarily seen.

Starting with 3.1.15 some of the above conditions got checked and resulted in an exception. It turned out
Expand All @@ -64,13 +81,11 @@ With this setting all {include} subtemplate will be merge into the compiled inhe
could be rejected by exception.


If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate will not be merged.
You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option.
If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate will not be merged.You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option.
{include file='foo.bar' inline}

1. In case of a variable file name like {include file=$foo inline} you must use the variable in a compile_id $smarty->compile_id = $foo;
2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the
global compile_id as well $smarty->compile_id = $bar;
2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the global compile_id as well $smarty->compile_id = $bar;
3. If call templates with different template_dir configurations and a parent could same named child template from different folders
you must make the folder name part of the compile_id.

16 changes: 15 additions & 1 deletion Smarty/COPYING.lib → Smarty/LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
Smarty: the PHP compiling template engine

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU Lesser General Public License below for more details.


GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Expand Down Expand Up @@ -162,4 +176,4 @@ General Public License ever published by the Free Software Foundation.
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Library.
Loading

0 comments on commit aa68b3a

Please sign in to comment.