IT[X] status update and a reminder

From: Date: Sat, 22 Feb 2003 13:27:05 +0000
Subject: IT[X] status update and a reminder
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13622@lists.php.net to get a copy of this message
Greetings! Well, here is another status update on my HTML_Template_IT[X] fork. I added two more testcases to the unit testing suite: 1) ITX_cache_testcase, which checks whether caching of prepared templates works. Please note that it fails testInclude() and testCallback(), this is expected and documented. 2) IT_quirks_testcase, which checks for some unexpected behaviour of stock HTML_Template_IT Besides, I reviewed the HTML_Template_IT-related bugs in PHP bugs database and found three interesting ones, that were closed with no real solution provided: http://bugs.php.net/bug.php?id=20199 http://bugs.php.net/bug.php?id=20392 http://bugs.php.net/bug.php?id=21951 There are two distinct problems in these bug reports: 1) disappearance of '$' symbol from variables content; 2) removal of '{stuff}' from variables content, when removeUnknownVariables == true. The first problem is related to preg_replace() usage and did not appear in my fork, which uses str_replace(). However, some people complained that this broke BC, so I added a BC switch to use preg_replace() to my fork. The second problem appeared in both HTML_Template_IT versions and there was no *real* solution for it, so I had to develop one. Example 1: $tpl->setTemplate('{var}', true, true); $tpl->setOption('use_preg', true); $tpl->setVariable('var', 'All templates for $1!'); $tpl->show(); // It will output 'All templates for !', just like the stock version does Example 2: $tpl->setTemplate('{var}{foobar}', true, true); $tpl->setOption('preserve_data', true); $tpl->setVariable('var', 'abc{d}'); $tpl->show(); // It will output 'abc{d}', '{d}' is kept, while '{foobar}' is removed! The files are available for download in the usual place: http://158.250.10.119/pear/IT[X]-fork.tar.gz Now, for the reminder: I received two +1's to commit my fork as a replacement for the current HTML_Template_IT and three +1's to commit it as a new package. Some people gave conditional +1's or abstained from voting. Since then I made lots of BC-related changes, added testing suite, etc. Judging by the server logs, quite a number of people downloaded and (hopefully) tested my package. :] If someone wants to vote now or to re-vote, he is most welcome. :]

« previous php.pear.dev (#13622) next »