1# Smarty 3 template engine
2[smarty.net](https://www.smarty.net/)
3
4## Documentation
5
6For documentation see
7[www.smarty.net/docs/en/](https://www.smarty.net/docs/en/)
8
9## Distribution repository
10
11> Smarty 3.1.28 introduces run time template inheritance
12
13> Read the NEW_FEATURES and INHERITANCE_RELEASE_NOTES file for recent extensions to Smarty 3.1 functionality
14
15Smarty versions 3.1.11 or later are now on github and can be installed with Composer.
16
17
18The "smarty/smarty" package will start at libs/....   subfolder.
19
20To get the latest stable version of Smarty 3.1 use:
21
22```json
23"require": {
24    "smarty/smarty": "~3.1"
25}
26```
27
28in your composer.json file.
29
30To get the trunk version use:
31
32```json
33"require": {
34    "smarty/smarty": "~3.1@dev"
35}
36```
37
38For a specific version use something like:
39
40```json
41"require": {
42    "smarty/smarty": "3.1.19"
43}
44```
45
46PHPUnit test can be installed by corresponding composer entries like:
47
48```json
49"require": {
50    "smarty/smarty-phpunit": "3.1.19"
51}
52```
53
54Similar applies for the lexer/parser generator.
55
56```json
57"require": {
58    "smarty/smarty-lexer": "3.1.19"
59}
60```
61
62Or you could use:
63
64```json
65"require": {
66    "smarty/smarty-dev": "3.1.19"
67}
68```
69
70Which is a wrapper to install all 3 packages.
71
72Composer can also be used for Smarty2 versions 2.6.24 to 2.6.30.
73