Arbit - project tracking

Dwoo

Browse source code

File: / UPGRADE_NOTES

Type
application/octet-stream application/octet-stream
Last Author
Seldaek
Version
478bf67793eb1ba6cb6bd9b600c6b72676527fbc
Line Rev. Author Source
1 6c4451 Seldaek -----------------------------------------------------------------------------
2 478bf6 Seldaek -- Upgrading to Dwoo v1.0.0beta
3 Seldaek -----------------------------------------------------------------------------
4 Seldaek
5 Seldaek 1. Dwoo classes loading
6 Seldaek -----------------------
7 Seldaek
8 Seldaek While everything was previously included by Dwoo.php, this version introduces
9 Seldaek an autoload function (dwooAutoload) that handles this automatically. This
10 Seldaek means your choices are now :
11 Seldaek
12 Seldaek a) change your : include 'path/to/Dwoo.php';
13 Seldaek into : include 'path/to/dwooAutoload.php';
14 Seldaek this is the recommended setting, especially during development, so that if you
15 Seldaek are seeing a Dwoo error and want to report a bug, you get proper line numbers
16 Seldaek with the error and not just "error in Dwoo.compiled.php at line 2"
17 Seldaek
18 Seldaek b) use the compiled version of Dwoo, this is "experimental" and seems to provide better
19 Seldaek performances mostly under windows, with a linux server it might imrpove performances
20 Seldaek slightly if you have an opcode cache (APC, xcache, ..) :
21 Seldaek include 'path/to/Dwoo.compiled.php';
22 Seldaek
23 Seldaek c) load Dwoo classes yourself somehow, as part of your autoload function or
24 Seldaek whatever suits you best
25 Seldaek
26 Seldaek -----------------------------------------------------------------------------
27 e3eb1b Seldaek -- Upgrading to Dwoo v0.9.2
28 6c4451 Seldaek -----------------------------------------------------------------------------
29 Seldaek
30 Seldaek 1. Block plugins
31 478bf6 Seldaek ----------------
32 6c4451 Seldaek
33 Seldaek This version introduced a backward compatibility break with block plugins, this
34 Seldaek was needed to allow compile-time access to the block's (parsed) content, be
35 Seldaek very careful if you manipulate this content since it is php code and should remain
36 Seldaek so if you don't want syntax errors (which are fatal) during template run.
37 Seldaek
38 Seldaek Error message :
39 Seldaek
40 Seldaek Strict Standards: Declaration of Dwoo_Plugin_*::postProcessing() should be compatible with that of Dwoo_Block_Plugin::postProcessing()
41 Seldaek
42 Seldaek Solution :
43 Seldaek
44 Seldaek * Change your block plugins postProcessing method declaration to the following :
45 Seldaek
46 Seldaek public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content)
47 Seldaek
48 Seldaek * Then add "$content" to the beginning of your return value, or modify it if required
49 Seldaek
50 Seldaek 2. Strip modifier
51 Seldaek -----------------
52 Seldaek
53 Seldaek The strip modifier had the same name as the strip block, this worked when the block
54 Seldaek was hard coded within the compiler, but with the API change (see above) I was able
55 Seldaek to move it to a plugin. Since both plugins don't have the same purpose, there was
56 Seldaek a real problem and I had to rename it. The renaming will be handled by the smarty compatibility
57 Seldaek layer, but if you used it without smarty compatibility, you should edit your templates.
58 Seldaek
59 Seldaek 3. DWOO_COMPILE_DIRECTORY and DWOO_CACHE_DIRECTORY constants
60 Seldaek ------------------------------------------------------------
61 Seldaek
62 Seldaek If you used those before, you will now get an exception when loading Dwoo. This is done
63 Seldaek on purpose to help people to make the transition to the new method of doing it :
64 Seldaek
65 40bd38 Seldaek $dwoo = new Dwoo('myCompileDir', 'myCacheDir');