Arbit - project tracking

Dwoo

Browse source code

File: / CHANGELOG

Type
application/octet-stream application/octet-stream
Last Author
Jordi Boggiano
Version
8fb69e869885eceb179e8481819867ce99e43984
Line Rev. Author Source
1 9dbd272c seldaek [2010--] 1.2.0
2 cb80c435 seldaek ! BC Break: Dwoo_Core::isArray had to be fixed and it has been split up
3 seldaek in 3 methods, isArray (for array access), isTraversable (for foreach)
4 seldaek and count (just a helper that counts anything). It won't affect you
5 seldaek unless you built some plugin depending on isArray, in which case you
6 seldaek should check all works fine still
7 seldaek ! BC Break: Dwoo_Core::get now returns a new Dwoo_Core instance if it's
8 seldaek evaluating a template already, this only affects you if you built your
9 seldaek own include-like plugin, see the changes to include plugin in revision
10 seldaek 346 [http://bugs.dwoo.org/dwoo/browse_code/revision/345] for more infos
11 seldaek + Added {return} plugin that allows any included template to return
12 seldaek variables into the one that included it, or to the main controller
13 seldaek code via $dwoo->getReturnValues()
14 9315dcc8 seldaek + Moved Dwoo code to Dwoo_Core that is extended by Dwoo, so you can use
15 seldaek the Dwoo directory as an svn:externals without problems now and just
16 seldaek use Dwoo_Core in place of Dwoo in your code
17 aa5c9622 seldaek + Improved parsing of array() to support real php array syntax as well
18 seldaek as variables as array keys, thanks to acecream for the help
19 seldaek + Improved parsing of named parameters that can now be quoted
20 06407917 seldaek + Added support for instance and static method calls white-listing in
21 seldaek Dwoo_Security_Policy (see allowMethod()), this is hardly efficient
22 seldaek though for instance calls since it has to do runtime checks so use
23 seldaek it with caution
24 69f61f83 seldaek * Added $this->viewParam support to ZendFramework adapter through a
25 seldaek Dwoo_Adapters_ZendFramework_Dwoo class that extends Dwoo, you should use
26 seldaek this if you called setEngine() on the ZF view
27 b159408a seldaek * Fixed parsing of quoted keywords in if statements, like 'not' was
28 seldaek parsed as ! because using {if not $foo} is valid, but it was impossible
29 seldaek to use them even as string.
30 8eb1d240 seldaek * Fixed parsing bug with method calls used as arguments with a comma
31 seldaek following.
32 f9e78994 Jordi * Fixed parsing of function/constants that start with an underscore,
33 Jordi thanks to Dominik del Bondio for the patch
34 8fb69e86 Jordi * Adapters: Agavi: Added support for multiple plugin directories in the
35 Jordi config, thanks to Mike Seth for the patch
36 7c2e53a7 seldaek
37 9dbd272c seldaek [2010-02-07] 1.1.1
38 79a654f2 seldaek + Added {optional} plugin that just prints an optional var without any
39 seldaek notice if it doesn't exist
40 bd9d98a2 Seldaek + Added Dwoo::setTemplate() for testing purposes mostly
41 cf39726d seldaek * Fixed an {extends} parsing bug that prevented the use of single-quotes
42 seldaek around the parent template's filename
43 9b4b8364 Seldaek * Fixed a security issue, if you didn't use a custom compiler factory but
44 Seldaek passed the compiler directly to the get method with autoEscape enabled,
45 b159408a seldaek the autoEscape was disabled in included templates - Thanks to Fabien
46 9b4b8364 Seldaek Potencier for notifying me.
47 b159408a seldaek * Fixed a bug in {safe} when using variable-variables it would sometimes
48 f65127b4 seldaek corrupt the var name resulting in blank output
49 b159408a seldaek * Fixed a bug when accessing array indices that contain a minus sign, it
50 seldaek is now possible to access those using {$var[index-foo]},
51 a1d321a8 seldaek {$var['index-foo']} or {$index="index-foo"} {$var[$index]}
52 b159408a seldaek * Fixed a bug in {tif} that didn't work when 0 was given as the true or
53 0887207e seldaek false value
54 b159408a seldaek * Fixed a bug when using the autoEscape feature with sub-templates (the
55 seldaek compiled sub-template couldn't access the dwoo charset property,
56 e756cf9f seldaek resulting in a fatal error)
57 f1766640 seldaek * Fixed a property reading bug on objects that implemented __get but not
58 seldaek __isset, implementing __isset is however very much recommended
59 ef7c8321 seldaek * Fixed a Dwoo_Data bug in the append method when the index didn't exist
60 seldaek yet it threw a notice
61 c9eda80d seldaek * Fixed a bug when accessing global vars from a sub-template
62 cf4be68f seldaek * Fixed a couple bugs in the {dynamic} plugin with regard to using plugins
63 seldaek within a dynamic block
64 b52f9022 seldaek * Fixed a compilation bug when using a PluginProxy with highly nested calls
65 454339d0 seldaek * Fixed a {load_templates} bug, plugins used in external templates were not
66 cb3c2b55 seldaek loaded correctly, same for custom user plugins
67 b159408a seldaek * Cached templates now check the source template for modification before
68 eee94489 seldaek outputting the cached version
69 98293222 seldaek * Removed a couple of @-operator calls to file_get_contents
70 bd9d98a2 Seldaek
71 Seldaek [2009-07-18] 1.1.0
72 54bf4b40 seldaek ! BC Break: Dwoo::initGlobals() is only called once during the Dwoo object
73 ce2fb905 Seldaek construction. If you had overriden it and need to update global data
74 Seldaek before each template is executed you should instead override
75 54bf4b40 seldaek Dwoo::initRuntimeVars() and push stuff in the globals array there. Also
76 ce2fb905 Seldaek be aware that this means captured data, foreach values and so-on will
77 Seldaek persist from a parent template to an included one (but the include's
78 Seldaek changes will not be reflected on the parent), and from a template
79 54bf4b40 seldaek to the next if you render several in series.
80 05ec46fc seldaek + Added {template} plugin that allows you to define sub-templates and then
81 93275b7f seldaek call them (works recursively too, good for menus and lists)
82 05ec46fc seldaek + Added {load_templates} to load external sub-templates into your file
83 703f3039 seldaek + Allowed string concatenation assignments with {$foo.="bar"}
84 seldaek + Allowed access of static properties as {Foo::$bar}
85 ce2fb905 Seldaek + Plugins/Helpers that use a dynamic number of arguments through
86 Seldaek func_get_args are now working since the compiler lets any arguments in
87 53a2ddf8 seldaek excess pass through
88 907ce4e8 seldaek + Adapters: CodeIgniter: the adapter by Stefan Verstege has been added to
89 seldaek core and he will be its maintainer from now on
90 8da0ae46 Seldaek + Adapters: CakePHP: this adapter is now added to core and is designed to
91 Seldaek work with CakePHP 1.2
92 907ce4e8 seldaek * Adapters: Zend: Denis Arh is now appointed maintainer of that part and
93 seldaek fixed a few things since 1.0.1
94 dd288f0c Seldaek * The include_path isn't altered anymore, hopefully saving some stat calls
95 Seldaek * User classes extending Dwoo_Template_File are now supported better with
96 59d28f45 Seldaek regard to includes - Thanks to the Kayako.com team for the patch
97 ce2fb905 Seldaek * Objects now act like arrays when you access non-existing properties on
98 59d28f45 Seldaek them (i.e. it outputs a notice only if it's output straight, and none
99 Seldaek when passed to a function)
100 ce2fb905 Seldaek * For can now iterate backwards if you input numbers, it won't work with
101 f0196747 Seldaek variables though
102 ddea0cec Seldaek * Slight performance improvement with big inheritance trees
103 ce2fb905 Seldaek * No more double-slashes in template paths since this seemed to cause
104 Seldaek slight performance issues
105 1e5416f2 Seldaek * Fixed a bug with parsing AND/OR keywords in conditionals when they were
106 Seldaek followed by round brackets
107 ea8e8d54 Seldaek * Fixed assignments not handling multi-line values correctly
108 a6a50002 Seldaek * Fixed parameter parsing issue when a plugin name was all uppercased
109 93275b7f seldaek * Fixed assignments failing with autoEscape enabled
110 seldaek * Fixed parsing of vars with string keys that was too greedy
111 a7470bb1 Seldaek * Fixed an optimization causing foreach/for/loop variables not being
112 Seldaek accessible when the foreach/.. name was set dynamically
113 ce2fb905 Seldaek * Fixed parsing of comments that were on top of the file when there are
114 f71d4289 seldaek spaces at the end of it
115 7093aa38 seldaek * Dwoo_Template::$chmod is now enforced for directories as well (#18)
116 ce2fb905 Seldaek * Many new unit tests to improve code coverage and a bunch of bug fixes
117 93275b7f seldaek that resulted, but I didn't really keep track of them
118 05ec46fc seldaek
119 a57f533a Seldaek [2008-12-24] 1.0.1
120 a4b98908 seldaek * Direct assignments like {$foo = 5} now allow spaces around the operator
121 ac01ee14 seldaek * Fixed a {foreach} bug with the implode argument
122 seldaek * Fixed modulo operator in if statements
123 13f4eaae seldaek * Fixed date_format handling of negative and small unix timestamps
124 a57f533a Seldaek * Fixed a weird reference bug with ZF and includes.. whatever but thanks
125 fedf474e Seldaek to Denis Arh for the patch
126 ac01ee14 seldaek
127 e9bbec69 Seldaek [2008-10-23] 1.0.0
128 e1d4ca24 Seldaek ! BC Break: Small one that probably won't affect anyone, but it makes the
129 Seldaek PluginProxy feature much stronger. Basically if you used a custom one you
130 Seldaek will get a fatal error and need to update it to conform to the new
131 57c29c72 Seldaek IPluginProxy interface, that's it
132 8f3894d8 Seldaek + Compiler: the modifier syntax (|foo) can now be applied on functions and on
133 Seldaek complex variables i.e. {$obj->getStuff()|upper} or {lower('foo')|upper}
134 6dd36bca seldaek + SmartyCompat: Added a {section} plugin but I strongly discourage using it,
135 7996536c seldaek it was really made to support legacy templates, since {for} doesn't have to
136 a57f533a Seldaek handle {section}-BC anymore, it has been cleaned up a lot and the last
137 7996536c seldaek $skip parameter has been dropped
138 358484fa seldaek * The core Dwoo class doesn't need writable compile/cache dirs in the
139 seldaek constructor anymore so you can provide custom ones later through
140 seldaek ->setCompile(/Cache)Dir - thanks to Denis Arh for the patch
141 29c7ffb1 Seldaek * Adapters: Zend: major overhaul thanks to Denis Arh, templates files should
142 358484fa seldaek probably be moved in the scripts subfolder after this update though, and
143 seldaek the settings array has changed a bit, you will get warnings if you don't
144 seldaek update the code anyway
145 d3c7dbd7 Seldaek * Plugins: improved the dump plugin, it now displays object's properties
146 Seldaek and optionally public methods (if the new show_methods arg is set to true)
147 70c14e91 Seldaek - thanks to Stephan Wentz for the patch
148 f49e8f36 Seldaek * Adapters: Zend: Added parameters to provide a custom engine (extends Dwoo)
149 e9bbec69 Seldaek or a custom data class (extends Dwoo_Data) - thanks to Maxime Merian for
150 f49e8f36 Seldaek the patch
151 0ec75b61 seldaek * Compiler: added Dwoo_Compiler->setNestedCommentsHandling(true) to enable
152 seldaek parsing of nested comments (i.e. {* {* *} *} becomes a valid comment, useful
153 seldaek to comment out big chunks of code containing comments)
154 29c7ffb1 Seldaek * Lines containing only comments and whitespace are now entirely removed
155 Seldaek * Removed comments do not mess up the line count anymore (for error messages)
156 e1d4ca24 Seldaek * Fixed parsing bug in {func()->propertyOfReturnedObject}
157 70c14e91 Seldaek * Fixed file template class reading from the string compiler factory - thanks
158 Seldaek to MrOxiMoron for the patch
159 fc07f46e Seldaek * Fixed handling of variable variables that contained non standard characters
160 f49e8f36 Seldaek * Fixed a 1.0.0beta regression that messed with custom plugin directories
161 Seldaek on Windows
162 a57f533a Seldaek * SmartyCompat: Fixed a few bugs in the adapter and processor - thanks to
163 e9bbec69 Seldaek Stefan Moonen for the patches
164 39e2cef8 Seldaek
165 dc37bfb6 Seldaek [2008-09-08] 1.0.0beta
166 478bf677 Seldaek ! Important note : Dwoo.php should not be included directly anymore, please
167 Seldaek read the UPGRADE_NOTES file for more infos on the matter, if you don't
168 Seldaek your Dwoo install will most likely break after the update anyway
169 848d2a8a Seldaek ! BC Break: {include} and {extends} now support the include path properly,
170 Seldaek which means that if you include "foo/bar.html" from _any_ template and you
171 Seldaek have an include path set on your template object, it will look in all those
172 Seldaek paths for foo/bar.html. If you use relative paths, for example
173 Seldaek if you include "../foo/bar.html" AND have an include path set, you will now
174 Seldaek have a problem, because you can't mix both approaches, otherwise you should
175 Seldaek be fine, so to fix this you should convert your relative includes/extends
176 732f7cda Seldaek + Adapters: Added the Agavi interface for Dwoo
177 Seldaek (see /Dwoo/Adapters/Agavi/README)
178 4a19490e Seldaek + API: Added Dwoo_Compilation_Exception methods getCompiler() and
179 Seldaek getTemplate() so you can catch the exception and use those to build a nicer
180 Seldaek error view with all the details you want
181 bd14bd1c Seldaek + Plugins: Added a mode parameter to {strip} to allow stripping of javascript
182 Seldaek code blocks that use "// comments", because without this special mode the
183 Seldaek comments result in syntax errors
184 56bd88c9 Seldaek * The Compiler now ensures that a template starting with <?xml will not
185 Seldaek conflict with php using the short_open_tag=On setting
186 4afdfac6 Seldaek * Complex arrays keys can be read using {$var["Long|Key*With.some)Crap"]},
187 Seldaek however since it is really bad practice I won't spend time fixing edge
188 Seldaek cases, which are $ and '/" characters inside the string. Those will break
189 Seldaek it and that's it.. if you really care feel free to send a patch
190 848d2a8a Seldaek * Dwoo->get() is now stricter as to what it accepts as a "template", only
191 Seldaek Dwoo_ITemplate objects or valid filenames are accepted
192 Seldaek * Foreach and other similar plugins that support "else" now only count()
193 Seldaek their input before processing when an else block follows
194 478bf677 Seldaek * Various optimizations
195 257cdab5 Seldaek * Fixed compiler bug that created a parse error when you had comments in an
196 Seldaek extended template
197 2b587a07 Seldaek * Fixed extends bug when extending files in other directories using relative
198 Seldaek paths
199 b1eae358 Seldaek * Fixed parsing bug with "|modifier:param|modifier2} with:colon after it"
200 5dd58675 Seldaek * Bug fixed with smarty functions called with no parameters (in compat mode)
201 1bc77f92 Seldaek * Fixed Dwoo::isArray() check, objects implementing ArrayAccess are now
202 Seldaek valid (thanks to Daniel Cousineau for the patch)
203 693ea694 Seldaek * Fixed compiler warning when doing {func()->method()} or {func()->property}
204 fc550dad Seldaek * Fixed compiled/cached files being written in the wrong place when the path
205 Seldaek to the template contains "../"s
206 668df7e5 Seldaek * Fixed {if} failing with conditions using upper case operators (i.e. AND)
207 257cdab5 Seldaek
208 d9c6d6b9 Seldaek [2008-08-03] 0.9.3
209 257cdab5 Seldaek + Adapters: Added the ZendFramework interface for Dwoo
210 Seldaek (see /Dwoo/Adapters/ZendFramework/README)
211 37cb06e7 Seldaek + Plugins: Added the {a} block plugin to generate <a> tags
212 6c44519e Seldaek + Syntax: Added the ";" token that allows to group multiple instructions in one
213 5fc48230 Seldaek single template tag, example: {if $foo; "> $foo";$bar;/} is equal to:
214 Seldaek {if $foo}> {$foo}{$bar}{/} - This also allow block operations such as:
215 Seldaek {a http://url.com; "Text" /} which equals to {a http://url.com}Text{/}
216 Seldaek + Syntax: Block plugins that you want to call without content can be
217 e3eb1b76 Seldaek self-closed just like XML tags (e.g. {a "http://url.com" /} ). Be careful not
218 57022c2d Seldaek to close a non-block plugin like that however, since it will close it's
219 e3eb1b76 Seldaek parent block
220 37cb06e7 Seldaek + Syntax: Static methods can be called using {Class::method()}
221 Seldaek + Syntax: It is now possible to use a plugin's result as an object and call
222 Seldaek a method or read a property from it, i.e. {fetchObject()->doStuff()}
223 5fc48230 Seldaek + API: Added Dwoo_Plugin::paramsToAttributes() utility function to help
224 Seldaek with the creation of compilable xml/html-related plugins
225 8c5c98bf Seldaek + API: Added Dwoo->setPluginProxy() and Dwoo_IPluginProxy that allow you to
226 Seldaek hook into the compiler's plugin subsystem to provide your own plugin calls.
227 Seldaek Thanks to Denis Arh for the patch
228 Seldaek => http://forum.dwoo.org/viewtopic.php?id=70
229 37cb06e7 Seldaek + API: Dwoo->addPlugin() has a third parameter to mark a plugin as compilable
230 Seldaek + Compiler supports method calls into a method call's parameters
231 03f8ba13 Seldaek * Dwoo_Compiler::implode_r is now public/static so it can be used in other
232 Seldaek places such as plugin proxies
233 5fc48230 Seldaek * Syntax: Math expressions in strings are now only allowed when the entire
234 Seldaek expression is delimited, e.g. {"/$foo/$bar"} evaluates as just that while
235 Seldaek {"/`$foo/$bar`"} will result in "/".($foo/$bar), therefore processing the /
236 Seldaek as a division, this is better since URLs using / are far more common than
237 Seldaek math in strings
238 Seldaek => http://forum.dwoo.org/viewtopic.php?id=50
239 Seldaek * Compiler now allows the use of the right delimiter inside strings (e.g. {"}"})
240 Seldaek * Fixed a bug preventing if blocks containing a {elseif} followed by {else}
241 82351826 Seldaek * Fixed the Dwoo_ILoader interface and implemented it in Dwoo_Loader now
242 Seldaek => http://forum.dwoo.org/viewtopic.php?id=70
243 7d76b1de Seldaek * Fixed a compileId auto-generation creating conflicts
244 57022c2d Seldaek * Include allows paths going in upper levels now such as : "../foo.html"
245 37cb06e7 Seldaek * Some compiler fixes regarding custom plugins
246 6c44519e Seldaek
247 40bd3808 Seldaek [2008-06-28] 0.9.2
248 c6133a3e Seldaek ! BC Break: Renamed the {strip} modifier/function to {whitespace}, this does
249 Seldaek not affect the strip block, that has been moved off the compiler into a
250 40bd3808 Seldaek plugin. Which is why the name conflict had to be resolved. Please report
251 Seldaek any issue you might encounter when using the strip block
252 c6133a3e Seldaek ! BC Break: Changed the function signature of Dwoo_Block_Plugin::postProcessing
253 40bd3808 Seldaek it only affects you if you had any custom block plugins, see UPGRADE_NOTES
254 c6133a3e Seldaek for more details
255 6c44519e Seldaek ! BC Break: Dwoo_ITemplate::cache() must now return the cached file name or
256 Seldaek false if caching failed, only affects you if you had a custom template class
257 Seldaek and implemented cache() yourself
258 1c727de8 Seldaek ! BC Break: Dwoo_Loader is not static anymore so anything you did on it directly
259 40bd3808 Seldaek will break. Use $dwoo->getLoader()->addDirectory() instead of
260 1c727de8 Seldaek Dwoo_Loader::addDirectory() for example
261 Seldaek ! BC Break: DWOO_COMPILE_DIRECTORY and DWOO_CACHE_DIRECTORY are gone, set those
262 Seldaek paths in Dwoo's constructor (i.e. new Dwoo('compiledir', 'cachedir')) if you
263 Seldaek need to override the default ones
264 40bd3808 Seldaek + Plugins: Added {dynamic} that allows cached templates to have dynamic
265 c6133a3e Seldaek (non-cached) parts, when rendering a cached page, the dynamic parts can still
266 Seldaek use the variables you provides
267 1d3732c8 Seldaek + Plugins: Added {tif} that acts as a ternary if / allows you to use a ternary
268 Seldaek operator inside it
269 1c727de8 Seldaek + API: Added a Dwoo_ILoader interface if you want to provide a custom plugin
270 Seldaek loading solution (use $dwoo->setLoader($myLoader))
271 18fbe58f Seldaek + Added line numbers in compilation errors and improved several error messages
272 c6133a3e Seldaek + Added magic object-access methods to Dwoo_Data, so you can assign values by
273 Seldaek doing $data->var = $val; instead of $data->assign('var', $val);
274 40bd3808 Seldaek + Added get()/unassign()/isAssigned() methods to read, remove and check for the
275 c6133a3e Seldaek presence of a var inside a Dwoo_Data object
276 40bd3808 Seldaek * Plugins: added a fifth 'string $implode' parameter to {foreach}, it prints
277 Seldaek whatever you provide it between each item of the foreach, just like implode()
278 b9a093a2 Seldaek * Plugins: added a fourth 'bool $case_sensitive' parameter to {replace}
279 b8495654 Seldaek * Plugins: added a fourth 'bool $trim' parameter to {capture} that trims
280 Seldaek the captured text
281 c6133a3e Seldaek * Made the dependency on the hash extension optional
282 Seldaek * Fixed compiler bug that prevented method calls combined with named parameters
283 Seldaek * Fixed compiler bug that prevented the % shortcut for constants to work within
284 40bd3808 Seldaek function calls (basically it only worked as {%CONST})
285 f1a18407 Seldaek * Fixed compiler bug that prevented empty() to be called
286 23a6b728 Seldaek * Fixed several modifier parsing bugs
287 Seldaek => http://forum.dwoo.org/viewtopic.php?id=27
288 Seldaek * Fixed empty string parsing in modifier applied to variables
289 1c811341 Seldaek * Fixed compiler handling of <?php echo "foo" ?>{template_tag} where there was
290 Seldaek no ';' at the end of the php tag
291 c6133a3e Seldaek * Allowed method calls to work with named parameters
292 f1a18407 Seldaek * Removed checks for methods/properties being present on objects before calling
293 Seldaek them since these can be handled by __get() and __call()
294 Seldaek => http://forum.dwoo.org/viewtopic.php?id=22
295 Seldaek * Calling {func (params)} (with the space between function and params) is now
296 23a6b728 Seldaek allowed
297 Seldaek => http://forum.dwoo.org/viewtopic.php?id=21
298 1d3732c8 Seldaek * The compiler now allows \r, \n and \t to be parameter splitters as well as
299 c6133a3e Seldaek "," and " ". You can therefore split complex function calls on multiple lines
300 1e246992 Seldaek * Converted most of the code to follow PEAR Coding Standards, hopefully this
301 Seldaek didn't break anything that the tests missed
302 c6133a3e Seldaek * A few other minor or internal changes
303 1e246992 Seldaek
304 af562417 Seldaek [2008-05-30] 0.9.1
305 63008982 Seldaek + API: Added Dwoo_Compiler->setAutoEscape() and getAutoEscape() to modify the
306 Seldaek automatic html entity escaping setting. This is disabled by default, and when
307 3908610b Seldaek enabled can be overriden with the {safe $var} plugin or the
308 Seldaek {auto_escape disable} block plugin. The block plugin can also be used to
309 63008982 Seldaek enable this mode from within a template
310 157ad4e0 Seldaek + Syntax: Mixing named and unnamed parameters is now allowed, as long as the
311 Seldaek unnamed ones appear first
312 Seldaek + Syntax: Added {/} shortcut that closes the last opened block
313 6b6abd1d Seldaek * Optimized scope-handling functions, {loop} and {with} are now slightly faster
314 9749a55f Seldaek * Fixed a bug in {date_format} that prevented anything but unix timestamps to
315 Seldaek work
316 f377fd89 Seldaek * {literal} and {strip} now follow the LooseOpeningsHandling setting
317 914a9658 Seldaek * Fixed complex variables (i.e. {$_root[$c[$x.0]].0}) parsing bugs
318 6a2aa583 Seldaek * Fixed $dwoo->addResource() breaking if the resource class was not loaded yet,
319 Seldaek autoload should now be called (thanks mike)
320 3908610b Seldaek * Fixed a block stack bug that messed up {textformat} and possibly usermade
321 Seldaek block plugins
322 6b6abd1d Seldaek
323 eec2dabe Seldaek [2008-05-10] 0.9.0
324 9cf6ad5f Seldaek ! BC Break: changed all class names to be PEAR compliant (aka use underscores
325 Seldaek to separate words/paths), sorry about that but I better do it now than in
326 Seldaek six months
327 dc33f417 Seldaek ! BC Break: $dwoo->output() and get() have been swapped internally, but it
328 Seldaek doesn't change anything for you unless you called output(*, *, *, true)
329 Seldaek directly to emulate get(). This was done to reduce some overhead
330 Seldaek ! BC Break: $dwoo->getTemplate() changed to $dwoo->templateFactory() and
331 Seldaek $dwoo->getCurrentTemplate() changed to $dwoo->getTemplate() for consistency
332 Seldaek among all classes and factory functions
333 fc42867d Seldaek + Added a compiled version of Dwoo that loads faster (especially with opcode
334 Seldaek caches such as APC), include Dwoo.compiled.php instead of Dwoo.php on
335 Seldaek production but if you want to file a bug use Dwoo.php please as it allows
336 Seldaek you to get the proper file/line number where an error occurs. Do not remove
337 Seldaek all other files however since they are not all included in the compiled
338 Seldaek package
339 dc33f417 Seldaek + Plugins: Added {extends} and {block} to handle template inheritance, read
340 Seldaek more about it at http://wiki.dwoo.org/index.php/TemplateInheritance
341 Seldaek + Plugins: Added {loop} that combines {foreach} and {with}, see
342 Seldaek http://wiki.dwoo.org/index.php/Block:loop for details
343 Seldaek + Plugins: Added {do} that executes whatever you feed it whitout echoing the
344 Seldaek result, used internally for extends but you can use it if required
345 dc02338d Seldaek + Plugins: Added {eol} that prints an end of line character (OS-specific)
346 dc33f417 Seldaek + Syntax: Added shortcut for {$dwoo.const.*} using '%', for example you can use
347 Seldaek {%FOO} instead of {$dwoo.const.FOO}
348 Seldaek + Syntax: When using named parameters, typing a parameter name without any
349 Seldaek value is the same as typing param=true, for example {foo name="test" bar} and
350 Seldaek {foo name="test" bar=true} are equals, can be useful for very complex plugins
351 Seldaek with huge amounts of parameters.
352 Seldaek + Syntax: Added support for {$foo+=5}, {$foo="a"}, {$foo++} and {$foo--}
353 Seldaek + Syntax: Added shortcut for $dwoo.*, you can now use {$.foreach.foo} instead
354 Seldaek of {$dwoo.foreach.foo} for example, applies to all $dwoo.* vars
355 dc02338d Seldaek + Syntax: Added $ as a shortcut for current scope, $_ for $_parent and $__ for
356 Seldaek $_root
357 9cf6ad5f Seldaek + API: Added getSource(), getUid() and getResourceIdentifier() to Dwoo_ITemplate
358 Seldaek + API: Added setSecurityPolicy() too Dwoo_ICompiler and modified the arguments
359 dc33f417 Seldaek of its compile() method
360 9cf6ad5f Seldaek + API: Added a bunch of utility functions to Dwoo_Compiler, allowing compiled
361 dc33f417 Seldaek plugins to access more of the compiler internals
362 b076166a Seldaek + Both cache and compile IDs can now have slashes in them to create subfolders
363 Seldaek in the cache/compile dirs
364 Seldaek + Added a DWOO_CHMOD constant that, if set before you include Dwoo, allows you
365 Seldaek to define the file mode of all the file/directories Dwoo will write, defaults
366 Seldaek to 0777
367 dc02338d Seldaek + Added a 'data' argument to {include} to be able to feed data directly into it
368 fc42867d Seldaek * The compiler now throws Dwoo_Compilation_Exception exceptions upon failure
369 Seldaek and security problems lead to a Dwoo_Security_Exception being thrown. Runtime
370 Seldaek plugin errors and such trigger simple php errors to allow the template
371 Seldaek execution to complete
372 860ce2d9 Seldaek * Fixed a potential concurrency issue (thanks to Rasmus Schultz for the patch)
373 dc33f417 Seldaek * Moved all files to Dwoo/Class.php excepted for the core Dwoo.php file
374 Seldaek * Various performance improvements, including the removal of a lot of isset()
375 Seldaek calls. Doing {$foo} if foo is undefined will now display a PHP warning, but
376 Seldaek doing {foreach $foo}..{/foreach} will not however, that way you don't have
377 Seldaek to do {if isset($foo)} before the foreach, but automated isset() calls don't
378 Seldaek impact performance as much as they did before.
379 9cf6ad5f Seldaek * API: Dwoo_ITemplate->clearCache now requires a Dwoo instance as its first arg,
380 dc33f417 Seldaek should not affect you unless you built a custom template class from scratch
381 Seldaek * Reworked Dwoo template rendering to avoid variable conflicts with plugins
382 Seldaek * {include} now uses the current resource if none is provided instead of using
383 Seldaek file as it did before
384 Seldaek * Dwoo uses include path instead of absolute includes
385 Seldaek * Changed all line endings to Unix (line feed only) and all spaces left have
386 Seldaek been converted to tabs (tabspace 4)
387 Seldaek * TestFest happened early for Dwoo, lots of new tests and more code covered
388 860ce2d9 Seldaek * Fixed a regression in the handling of custom class plugins
389 Seldaek * Fixed various bugs in the Adapter class and related smarty compatibility
390 Seldaek features
391 Seldaek * Fixed a classpath rebuilding bug that occured on some UNIX platforms due to
392 Seldaek glob() returning false sometimes for empty folders
393 Seldaek * Fixed a bug in Dwoo_Security_Policy->getAllowedDirectories(), no security
394 Seldaek issue though
395 9cf6ad5f Seldaek * Fixed a bug in Dwoo::setScope affecting {loop} and {with}
396 860ce2d9 Seldaek * Fixed a parsing bug when doing {"string"|modifier:$var}
397 dc33f417 Seldaek
398 Seldaek [2008-04-09] 0.3.4
399 Seldaek ! BC Break: DWOO_PATH constant changed to DWOO_DIRECTORY
400 Seldaek ! BC Break: Smarty's @ operator for modifiers is now reversed, for example
401 Seldaek $array|reverse will reverse the items of that array while $array|@reverse
402 Seldaek will reverse each item of the given array (as if you used array_map)
403 Seldaek + Syntax: Added support for method calls on objects i.e. {$foo->bar()}
404 Seldaek + Added support for smarty security features, see the DwooSecurityPolicy class
405 Seldaek and $dwoo->setSecurityPolicy()
406 Seldaek + API: Added a DwooCompiler->setLooseOpeningHandling() method that, if set to
407 Seldaek true, allows tags to contain spaces between the opening bracket and the
408 Seldaek content. Turned off by default as it allows to compile files containing
409 Seldaek css and javascript without the need to escape it through {literal} or \{
410 Seldaek + Added DWOO_CACHE_DIRECTORY and DWOO_COMPILE_DIRECTORY constants that you can
411 Seldaek set before including Dwoo.php to override the defaults (although
412 Seldaek Dwoo->setCacheDir/setCompileDir() still work to change that if required)
413 Seldaek + Added the DwooException class
414 Seldaek + Smarty: Added partial support for register_object(), unregister_object() and
415 Seldaek get_registered_object(). All features can not be supported by the adapter
416 Seldaek though so you might get compatibility warnings
417 Seldaek * Fixed {elseif} bug that appeared when multiple elseif tags were used in a row
418 Seldaek * Syntax: Improved simple math support to work within variable variables
419 Seldaek (i.e. you can do {$array[$index+1]}) and within strings as well. To prevent
420 Seldaek this enclose the variables in backticks (i.e. {"$foo/$bar"} will do the math
421 Seldaek while {"`$foo`/$bar"} won't as $foo is properly delimited)
422 Seldaek * Changed DwooLoader::addDirectory() so that it writes the class paths cache
423 Seldaek into DWOO_COMPILE_DIRECTORY, that way you don't have to make your plugin
424 Seldaek directory writable
425 Seldaek * Made all the error triggering more consistent
426 Seldaek * Changed automatic cacheId generation in DwooTemplateFile/String to be faster
427 Seldaek
428 Seldaek [2008-03-19] 0.3.3
429 Seldaek + Syntax: Added support for $dwoo.const.CONSTANT and
430 Seldaek $dwoo.const.Class::CONSTANT to read PHP constants from the template
431 Seldaek + Syntax: Added support for on/off/yes/no, that work as aliases for true/false
432 Seldaek + Syntax: Added the $dwoo.charset global variable
433 Seldaek + Plugins: Added {withelse} and made {with} compatible with {else} also
434 Seldaek + API: Added left/right delimiters customization, see DwooCompiler->setDelimiters()
435 Seldaek + API: Added DwooCompiler->triggerError()
436 Seldaek + API: Added Dwoo->clearCache() and DwooITemplate->clearCache() methods
437 Seldaek + Smarty: The smartyCompat prefilter converts {section} tags into {for} tags on the
438 Seldaek fly, however it's not guaranteed to work with *all* section tags, let me know if
439 Seldaek it breaks for you
440 Seldaek * {with} now skips the entire block if it's variable doesn't exist, so by
441 Seldaek itself it acts as if you would do {if $var}{with $var}{/with}{/if}
442 Seldaek * Each resource has a compiler factory function assigned to it, allowing you to
443 Seldaek easily provide a custom compiler without loading it on every page
444 Seldaek * OutputFilters are now simply called Filters (they still use DwooFilter)
445 Seldaek * Pre/PostFilters have become Pre/PostProcessors (they now use DwooProcessor)
446 Seldaek * Compiler: Fixed parsing bug that prevented function names of 1character
447 Seldaek * Compiler: Changed internal handling of variables to fix some errors being
448 Seldaek thrown with specific cases
449 Seldaek * Reorganized Dwoo/DwooCompiler and fully commented all the core classes
450 Seldaek and interfaces
451 Seldaek
452 Seldaek [2008-03-09] 0.3.2
453 Seldaek + Added access to superglobals through $dwoo.get.value, $dwoo.post.value,
454 Seldaek etc.
455 Seldaek + Added outputFilters to Dwoo (use Dwoo->addOutputFilter and
456 Seldaek Dwoo->removeOutputFilter)
457 Seldaek + Added preFilters and postFilters to DwooCompiler (use
458 Seldaek DwooCompiler->addPreFilter, etc)
459 Seldaek + Added a html_format output filter that intends properly the html code,
460 Seldaek use it only on full page templates
461 Seldaek + Plugins: Added {for} and {forelse} which allow to loop over an array or to
462 Seldaek loop over a range of numbers
463 Seldaek + Plugins: Added {mailto}, {counter}, {eval}, {fetch} and {include}
464 Seldaek + Syntax : Enhanced support for implicit math operations,
465 Seldaek {$var+$var2*var3+5} now works. Operations are executed from left to right
466 Seldaek though, there is no operator priority. (i.e. 1+1*2 = (1+1)*2 = 4, not 3)
467 Seldaek + API: Added resources support through DwooITemplate implementations and
468 Seldaek Dwoo->addResource()
469 Seldaek + API: Added Dwoo->getTemplate() to get the currently running template object
470 Seldaek + API: Added DwooCompiler::getInstance() to use only one compiler object when
471 Seldaek rendering from the default compiler and to provide you with a singleton if
472 Seldaek it's easier, however the class is not a singleton in the sense that it can
473 Seldaek be instantiated separately
474 Seldaek + API: Added a factory method on DwooITemplate to support resources creation
475 Seldaek + Added a release tag so that all compiled templates are forced to recompile
476 Seldaek after an update, however it is recommended to cleanup your "compiled"
477 Seldaek directory now and then as each release uses new filenames
478 Seldaek + Added an abstract DwooFilter class that you can extend to build filters
479 Seldaek * PHP function calls are now case insensitive
480 Seldaek * Syntax: The compiler now parses expressions before modifiers, allowing for
481 Seldaek {$var/2|number_format} for example
482 Seldaek * DwooTemplateFile now extends DwooTemplateString instead of the other way
483 Seldaek around as it was before
484 Seldaek * {else} is now a general purpose plugin that can act as 'else' for foreach,
485 Seldaek for and if/elseif, foreachelse is still available though
486 Seldaek
487 Seldaek [2008-03-05] 0.3.1
488 Seldaek + Added {cycle} function
489 Seldaek + Syntax : Enabled support for associative arrays using
490 Seldaek array(key="value", key2=5) for example, which you can assign or use in a
491 Seldaek foreach directly
492 Seldaek + Syntax : Added support for {$var +-/*% X} (i.e. {$var + 4}), useful for
493 Seldaek simple math operations without the math plugin
494 Seldaek + API : Added append/appendByRef to DwooData
495 Seldaek + Completely rebuilt DwooSmartyAdapter, it should "work" and fail silently if
496 Seldaek you use a non supported function now, however you can set
497 Seldaek $smarty->show_compat_errors=true; on it to receive notices about unsupported
498 Seldaek features that you use
499 Seldaek * Bug fixed in {literal} parsing
500 Seldaek * Bug fixed in smarty functions handling
501 Seldaek * API : Moved Plugin types constants to Dwoo so the compiler doesn't have to
502 Seldaek be loaded unles really required
503 Seldaek * API : Moved globals and var reinitialization in Dwoo into their own methods
504 Seldaek so that child classes can easily add globals
505 Seldaek * Some improvements in the compiler output
506 Seldaek * Some changes in the cache handling of DwooTemplateFile
507 Seldaek - Special thanks to Andrew Collins that found many of the bugs fixed in this
508 Seldaek release
509 Seldaek
510 Seldaek [2008-03-02] 0.3.0
511 Seldaek + Full template cache support
512 Seldaek + DwooTemplateString class to load templates from a string
513 Seldaek + Dwoo::VERSION constant
514 Seldaek + {dump} plugin to print out variables
515 Seldaek + Unit tests (with PHPUnit) covering 73% of the codebase right now, which
516 Seldaek should help reducing regression bugs in the next versions.
517 Seldaek + Started commenting (with phpdocs) properly all the classes, should be
518 Seldaek complete for 0.4.0
519 Seldaek * {capture} is now compilable and has a new boolean flag to append output into
520 Seldaek the target variable instead of overwriting
521 Seldaek * {foreach} supports direct input (instead of only variables), allowing
522 Seldaek constructs like {foreach array(a,b,c) val}{$val}{/foreach} for example that
523 Seldaek would output abc.
524 Seldaek * pre/postProcessing functions in block plugins now receive an array of named
525 Seldaek parameters instead of numbered
526 Seldaek * Major refactoring of DwooTemplateFile and DwooCompiler
527 Seldaek * Cleaned up members visibility in Dwoo/DwooCompiler
528 Seldaek * Fixes in the compiler parsing and general variables handling
529 Seldaek * Multiple bugfixes here and there thanks to the unit tests
530 Seldaek * Optimized {foreach} a lot
531 Seldaek
532 Seldaek [2008-02-19] 0.2.1
533 Seldaek * Compiler fixes for argument parsing and handling of Smarty plugins
534 Seldaek
535 Seldaek [2008-02-14] 0.2.0
536 Seldaek + Added support for plugins made for Smarty (that includes modifiers,
537 Seldaek functions and blocks). Not thoroughly tested.
538 Seldaek + Major API changes in the way Dwoo must be run, it's now much more
539 Seldaek flexible and should not change too much in the future.
540 Seldaek + Added support for custom plugins, filters should come in the next version
541 Seldaek although the API to register them is already in.
542 Seldaek
543 Seldaek [2008-02-08] 0.1.0
544 f9e78994 Jordi Initial release