by Alan Knowles alan_k@php.net

Considering the summer holidays, PEAR has had another extremely busy week with 10 stable releases, 4 beta releases, and discussions ranging from PEAR in Gentoo, new categories, a new manual, and a powered by PEAR icon.


New Releases

Stable

Beta


PEAR-DEV traffic

PEAR and Gentoo

Gentoo have added some PEAR packages to their portage tree (their package installation system). The list of available packages can be read at Gentoo dev-php.

New Categories PHP, Template

Following the introduction of bcompiler, it was suggested that a new category "PHP" would be useful, and could contain packages like PHPDoc, PHPUnit, and bcompiler, as they are all packages and modules that deal with PHP parsing, compiling etc. It was generally accepted that this was a reasonable idea. The other suggestion of a Template category, for packages like HTML_Template_IT, Template_Flexy, Template_Smart, drew some discussion, as it was pointed out that these Template classes, (which currently reside under HTML), could be used for other types of Files (eg. XML, Email, RTF etc.). The current voting stood as 2-3 for and 1 against.

Weekly news and HTML

Most of the translators pointed out that the current 'Mozilla Generated' HTML for the weekly news was a bit difficult to translate in Vi/emacs etc (as it was a bit messy). Alan agreed to tidy up the HTML before committing. More Translations have been added Antônio Carlos Venâncio Júnior (Brazilian Portuguese) and Robert Janeczek (Polish). The Weekly news should be using the gettext extension in php (for the main titles), however we are still awaiting confirmation from the webmaster to see if it can be made available.

Smarty and PEAR

It was agreed that for the time being Smarty would be made available as a PEAR package (even though it does not confirm to the PEAR standards), and only minor changes would be made to ensure it worked smoothly with the PEAR installer.

PEAR Movements

Stig continued to move the non essential parts of PEAR out of the PHP distribution (which will eventually only contain enough to get the PEAR packager up and going). Net_SMTP, Net_Curl, Mail are now in the main PEAR CVS directory (only package files will be distributed with PHP 4.3.0, due for QA testing soon).

Changing Databases in DB and MDB, and ODBC cursors

The question was raised about how to switch databases when using PEAR's database abstraction layer, after some discussion the current suggestion is to use
$db->disconnect();
$db = DB::connect($new_dsn);
This is the recommended way, as not all database backends (at the PHP level), can support switching databases, however anyone who wants to implement a solution that provides switching (for databases that support it), and disconnecting (for those that do not) is welcome to send patches. Lukas commented that he believed MDB should handle it ok.
In a related mater, Tomas indicated that he will be adding ODBC cursor support to the dsn format for example.
odbc://user:pass@ds?cursor_type=SQL_CUR_USE_ODBC

Developers Guide and PEARdoc2

Martin Jansen added a new developers guide to the PEAR Manual, to help answer those developer questions that crop up often - like "How do I write a package file?" and "Why is there is a coding standard?". Meanwhile Alexander completed his revision of the PEAR manual, making it more modular, and easier to extend, expect to see a brand new manual online very soon.

DB_Pager returning constant results

Richard Wall sent in a patch to make DB_Pager::getData() return a constant number, as it currently followed the Google method, which was a bit confusing for some people. It was generally agreed to make the new 'developer friendly version' available as an extra to the current default method.

Security and Config_DB

It was noticed by Bertand Mansion, that the Config_DB Container of the Config package printed out the DSN (database username, password, etc.) when certain errors occurred, this was not a particular desirable effect, and it was noted that developers should be careful about displaying error messages with passwords in.

Passing by reference

For those not following php-dev@lists.php.net, two interesting articles were mentioned regarding speed of passing by reference, - unlike C, PHP is actually slower when passing (strings and integers) by reference - so be a little careful using this feature on packages that need to be performance tuned. References: [http://www.zend.com/zend/art/ref-count.php] and [http://phplens.com/lens/php-book/optimizing-debugging-php.php].

Open office and Abiword for writing docbook

It was mentioned that Open office was considering adding a docbook editing mode, and AbiWord could export to docbook, however neither of these are 'fully working solutions', and at present the best bet is still emacs, vim or a alternative text editor or XMetal for windows users. Suggested reading for authors is the phpdoc how-to available at http://cvs.php.net/co.php/phpdoc/howto/howto.html.tar.gz.

PEAR Snapshots

It was asked if a snapshot of all PEAR packages could be made available. In general, however the PEAR community doesn't really see the value in doing this (due to the large size that PEAR will probably end up), however if somebody wishes to make their own snapshots, they are welcome. As a result however it was planned to add:
pear upgrade-all
Which would update all installed packages to the latest versions.

Powered by PEAR

powered by pear Colin Viebrock added a new powered by PEAR icon to use on your PEAR powered sites. You can download it from http://pear.php.net/gifs/pear-power.gif.

Bugs and Fixes

Thanks to Paweł Gołaszewski, Matt Allen, James E. Flemer, Tal Peer and Dave Clark for spotting bugs and some fixes.

Proposed Packages

Cache_Lite - SpeedyGonzales's Caching.

Marty Fabien Proposed a cut down version of the Cache class, which focused on performance (in a single class), NFS safety and block caching. After much discussion over the naming (including suggestions like Cache_Fast, Cache_Simple, Cache_HighTraffic, Cache_RoadRunner, Cache_SpeedyGonzales and Cache_BeepBeep), Cache_Lite was settled on. It was noted that accelerators like Zends, PHPAcelerator and APC would also make a considerable difference if you are going for speed/performance.

Development

Active this week in CVS: MDB, The PEAR manual and FAQ, PECL::soap, DB, HTML_Table, XML_CSSML, PHPDoc, Mail, HTML_Javascript, Auth_HTTP, PECL::bcompiler, HTML_QuickForm, Config, Log, Auth, PEAR_FrontEnd_Gtk, XML_RPC and Net_NNTP.